-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from expipiplus1/actions
Add actions to help with releases
- Loading branch information
Showing
6 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: cachix/install-nix-action@v12 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build project | ||
run: | | ||
mkdir assets | ||
nix-build ./release.nix -A sdistTest --no-out-link | ||
ln -s "$(nix-build release.nix -A tarball --no-out-link)"/*.tar.gz assets/ | ||
ln -s "$(nix-build release.nix -A docs --no-out-link)"/*.tar.gz assets/ | ||
ref="${{ github.ref }}" | ||
printf "Release ${ref#"refs/tags/"}\n\n" >release-note.md | ||
# Get the section after the WIP section | ||
awk '/## WIP/{flag=0;next};/##/{flag=flag+1};flag==1' <changelog.md | | ||
sed "/^##/d" >>"release-note.md" | ||
- name: Create Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
if [ -f release-note.md ]; then | ||
hub release create \ | ||
$(find assets -type f -o -type l -printf "--attach %p ") \ | ||
--file release-note.md \ | ||
${{ github.ref }} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Tag Latest Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: cachix/install-nix-action@v12 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Fetch everything | ||
ssh-key: ${{ secrets.DEPLOY_KEY }} | ||
- uses: expipiplus1/tag-latest-release/tag-latest-release@HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ pkgs ? import <nixpkgs> { }, compiler ? null }: | ||
|
||
with pkgs.haskell.lib; | ||
|
||
let drv = import ./default.nix { inherit pkgs compiler; }; | ||
in { | ||
tarball = sdistTarball drv; | ||
docs = documentationTarball drv; | ||
sdistTest = buildFromSdist drv; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters