webhookd/.github/workflows/build.yml
2023-10-03 20:57:24 +00:00

51 lines
1.3 KiB
YAML

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Test
run: make build test
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Conventional CHANGELOG
id: changelog
uses: TriPSs/conventional-changelog-action@v3
if: github.ref == 'refs/heads/master'
with:
github-token: ${{ secrets.github_token }}
- name: Distribution
run: make distribution
if: github.ref == 'refs/heads/master' && steps.changelog.outputs.skipped == 'false'
- name: Release
uses: softprops/action-gh-release@v1
if: github.ref == 'refs/heads/master' && steps.changelog.outputs.skipped == 'false'
with:
body: ${{ steps.changelog.outputs.clean_changelog }}
tag_name: ${{ steps.changelog.outputs.tag }}
name: ${{ steps.changelog.outputs.tag }}
files: |
release/webhookd-linux-amd64.tgz
release/webhookd-linux-arm64.tgz
release/webhookd-linux-arm.tgz
release/webhookd-darwin-amd64.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}