Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
修复获取不到版本号问题
  • Loading branch information
even0306 authored Jul 2, 2024
1 parent f247b5f commit 06b6aab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Show workflow information
run: |
export _NAME=$(jq ".[\"$GOOS-$GOARCH$GOARM$GOMIPS\"].friendlyName" -r < .github/build/friendly-filenames.json)
export VERSIONNUM=$(cat main.go | grep "version :=" | awk -F "\"" '{print $2}')
export VERSIONNUM=$(cat version.go | grep "x byte" | awk '{print $4}').$(cat version.go | grep "y byte" | awk '{print $4}').$(cat version.go | grep "z byte" | awk '{print $4}')
echo "GOOS: $GOOS, GOARCH: $GOARCH, RELEASE_NAME: $_NAME"
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
echo "VERSION=$VERSIONNUM" >> $GITHUB_ENV
Expand Down Expand Up @@ -70,4 +70,4 @@ jobs:
file: ./db_backup_go_${{ env.ASSET_NAME }}*
tag: ${{ env.VERSION }}
release_name: "db_backup_go"
file_glob: true
file_glob: true

0 comments on commit 06b6aab

Please sign in to comment.