Skip to content

Commit a6f8a21

Browse files
authored
ci: fix release name scheme (#5)
1 parent 8af2514 commit a6f8a21

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,23 @@ jobs:
4545
shell: bash
4646
run: |
4747
sha256sum ${{ matrix.asset_name }}${{ matrix.archive_ext }} > ${{ matrix.asset_name }}${{ matrix.archive_ext }}.sha256
48+
49+
- name: Get current date
50+
id: date
51+
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
52+
- name: Test with environment variables
53+
run: echo $TAG_NAME - $RELEASE_NAME
54+
env:
55+
TAG_NAME: tag-${{ steps.date.outputs.date }}
56+
RELEASE_NAME: v-${{ steps.date.outputs.date }}
57+
4858
- name: Upload binary to release
4959
uses: svenstaro/upload-release-action@v2
5060
with:
5161
repo_token: ${{ secrets.GITHUB_TOKEN }}
5262
file: ${{ matrix.asset_name }}${{ matrix.archive_ext }}
53-
asset_name: ${{ matrix.asset_name }}${{ matrix.archive_ext }}
54-
tag: ${{ github.ref }}
63+
asset_name: v-${{ steps.date.outputs.date }}
64+
tag: tag-${{ steps.date.outputs.date }}
5565
overwrite: true
5666

5767
- name: Upload SHA256 checksum to release

0 commit comments

Comments
 (0)