Add building via gh workflows

This commit is contained in:
2023-05-04 23:12:16 +01:00
parent 8b1358c8d1
commit 5746a1a4fd
3 changed files with 58 additions and 1 deletions
+29
View File
@@ -0,0 +1,29 @@
name: main
on: push
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v19
- run: nix develop -c go generate
- run: nix develop -c go test
release:
name: Build Release
if: startsWith(github.event.ref, 'refs/tags/v')
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v19
- run: nix develop -c goreleaser release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: softprops/action-gh-release@v1
with:
files: "*.deb"