Skip to content

Commit

Permalink
Revert "ci: publish release just after builds"
Browse files Browse the repository at this point in the history
This reverts commit 1da4f71.
  • Loading branch information
rogosprojects committed Aug 12, 2024
1 parent 5165815 commit 0203c41
Showing 1 changed file with 34 additions and 37 deletions.
71 changes: 34 additions & 37 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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:
Expand All @@ -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/[email protected]
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 }}'


0 comments on commit 0203c41

Please sign in to comment.