name: Release on: push: branches: - main jobs: bump: name: Create release runs-on: ubuntu-latest outputs: tag_name: ${{ steps.release.outputs.tag_name }} version: ${{ steps.release.outputs.version }} steps: - uses: actions/checkout@v3 - uses: rymndhng/release-on-push-action@master id: release with: bump_version_scheme: patch env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Package static files env: GOBIN: ${{ github.workspace }} run: | go install github.com/markbates/pkger/cmd/pkger # -o -include ./pkger -o db -include /db/migrations ./pkger -o web -include /web/html # TODO: This is duplicated in build.yml so it still runs when a release is # created in the GitHub UI. Find a way to dedupe. build: name: Build ${{ matrix.name }} needs: bump strategy: matrix: include: - name: Linux x86_64 goos: linux goarch: amd64 - name: Linux ARM goos: linux goarch: arm - name: macOS Intel goos: darwin goarch: amd64 - name: macOS Apple Silicon goos: darwin goarch: arm64 runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Release uses: wangyoucao577/go-release-action@master with: release_tag: ${{ needs.bump.outputs.tag_name }} github_token: ${{ secrets.GITHUB_TOKEN }} goarch: ${{ matrix.goarch }} goos: ${{ matrix.goos }} ldflags: -X main.version=${{ needs.bump.outputs.version }} md5sum: false sha256sum: true