Skip to content

Commit

Permalink
👷 add version to package name (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
SivWatt authored Jul 2, 2022
1 parent 93d31ca commit 534aaf9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/BuildExecutable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Make package name
run: |
ver=${{ github.ref }}
ver=${ver##*/}
echo "PKG_NAME=${{ env.EXE_NAME }}_${ver//./_}" >> $GITHUB_ENV
shell: bash

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
Expand All @@ -31,7 +38,7 @@ jobs:
- name: Compress release package
run: |
mv dist/${{ env.EXE_NAME }}.exe ${{ env.EXE_NAME }}.exe
7z a -tzip ${{ env.EXE_NAME }}.zip '@7zip_list_file.txt'
7z a -tzip ${{ env.PKG_NAME }}.zip '@7zip_list_file.txt'
- name: Create Release
id: create_release
Expand All @@ -51,6 +58,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.EXE_NAME }}.zip
asset_name: ${{ env.EXE_NAME }}.zip
asset_path: ${{ env.PKG_NAME }}.zip
asset_name: ${{ env.PKG_NAME }}.zip
asset_content_type: application/zip
12 changes: 11 additions & 1 deletion .github/workflows/python-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Make package name
run: |
ver=${{ github.ref }}
ver=${ver##*/}
echo "PKG_NAME=${{ env.EXE_NAME }}_${ver//./_}" >> $GITHUB_ENV
shell: bash

- name: Test result
run: echo ${{ env.PKG_NAME }}

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
Expand All @@ -55,4 +65,4 @@ jobs:
- name: Compress release package
run: |
mv dist/${{ env.EXE_NAME }}.exe ${{ env.EXE_NAME }}.exe
7z a -tzip ${{ env.EXE_NAME }}.zip '@7zip_list_file.txt'
7z a -tzip ${{ env.PKG_NAME }}.zip '@7zip_list_file.txt'

0 comments on commit 534aaf9

Please sign in to comment.