diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e417168..7d9f0a5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,44 +7,7 @@ on: jobs: - releases-matrix: - name: Release Go Binary - runs-on: ubuntu-latest - strategy: - matrix: - # build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64 - goos: [linux, darwin] - goarch: ["386", amd64, arm64] - exclude: - - goarch: "386" - goos: darwin - steps: - - name: "Get Release Info" - run: | - echo "RELEASE_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV - echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV - echo "PACKAGE_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_ENV - if [ "${{ matrix.goos }}" == "darwin" ]; then - echo "OS_NAME=macOS" >> $GITHUB_ENV - else - echo "OS_NAME=${{ matrix.goos }}" >> $GITHUB_ENV - fi - - uses: actions/checkout@v3 - - uses: wangyoucao577/go-release-action@v1.51 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - release_name: ${{ env.RELEASE_TAG }} - goos: ${{ matrix.goos }} - goarch: ${{ matrix.goarch }} - goversion: "1.22" - asset_name: '${{ env.REPOSITORY_NAME }}-${{ env.RELEASE_TAG }}-${{ env.OS_NAME }}-${{ matrix.goarch }}' - compress_assets: FALSE - executable_compression: upx -v - md5sum: false - ldflags: '-X github.com/${{ env.PACKAGE_NAME }}/cmd.BuildVersion=${{ env.RELEASE_TAG }}' - update-changelog: - needs: releases-matrix name: Create release runs-on: ubuntu-latest steps: @@ -66,5 +29,39 @@ jobs: commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]' file_pattern: CHANGELOG.md + releases-matrix: + name: Release Go Binary + runs-on: ubuntu-latest + strategy: + matrix: + # build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64 + goos: [linux, darwin] + goarch: ["386", amd64, arm64] + exclude: + - goarch: "386" + goos: darwin + steps: + - name: "Get Release Info" + run: | + echo "RELEASE_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV + echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV + echo "PACKAGE_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_ENV + if [ "${{ matrix.goos }}" == "darwin" ]; then + echo "OS_NAME=macOS" >> $GITHUB_ENV + else + echo "OS_NAME=${{ matrix.goos }}" >> $GITHUB_ENV + fi + - uses: actions/checkout@v3 + - uses: wangyoucao577/go-release-action@v1.51 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + goversion: "1.22" + asset_name: '${{ env.REPOSITORY_NAME }}-${{ env.RELEASE_TAG }}-${{ env.OS_NAME }}-${{ matrix.goarch }}' + compress_assets: FALSE + executable_compression: upx -v + md5sum: false + ldflags: '-X github.com/${{ env.PACKAGE_NAME }}/cmd.BuildVersion=${{ env.RELEASE_TAG }}'