From 541deac29e50994b1a316e47bf42f08f3b32e033 Mon Sep 17 00:00:00 2001 From: Mathias Petermann Date: Mon, 29 Aug 2022 21:41:47 +0200 Subject: [PATCH] Update checkout action, add pre_command for go generate --- .github/workflows/release.yml | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbfeba2..d43cecd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,6 @@ # .github/workflows/release.yaml -on: +on: release: types: [created] @@ -9,39 +9,51 @@ jobs: name: release linux/amd64 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: wangyoucao577/go-release-action@v1.22 + - uses: actions/checkout@v3 + - uses: wangyoucao577/go-release-action@v1.30 with: github_token: ${{ secrets.GITHUB_TOKEN }} goos: linux goarch: amd64 + pre_command: | + go install golang.org/x/tools/cmd/stringer@latest + && go generate ./... release-linux-arm64: name: release linux/arm64 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: wangyoucao577/go-release-action@v1.22 + - uses: actions/checkout@v3 + - uses: wangyoucao577/go-release-action@v1.30 with: github_token: ${{ secrets.GITHUB_TOKEN }} goos: linux goarch: arm64 + pre_command: | + go install golang.org/x/tools/cmd/stringer@latest + && go generate ./... release-linux-arm: name: release linux/arm runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: wangyoucao577/go-release-action@v1.22 + - uses: actions/checkout@v3 + - uses: wangyoucao577/go-release-action@v1.30 with: github_token: ${{ secrets.GITHUB_TOKEN }} goos: linux goarch: arm + pre_command: | + go install golang.org/x/tools/cmd/stringer@latest + && go generate ./... release-darwin-amd64: name: release darwin/amd64 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: wangyoucao577/go-release-action@v1.22 + - uses: actions/checkout@v3 + - uses: wangyoucao577/go-release-action@v1.30 with: github_token: ${{ secrets.GITHUB_TOKEN }} goos: darwin - goarch: amd64 \ No newline at end of file + goarch: amd64 + pre_command: | + go install golang.org/x/tools/cmd/stringer@latest + && go generate ./... \ No newline at end of file