Skip to content

Commit 7b24407

Browse files
authored
Merge pull request #31 from anzz1/ci_test
CI fine tuning
2 parents 96e0519 + e7bdee6 commit 7b24407

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
types: [opened, synchronize, edited, reopened, review_requested, ready_for_review]
1414
paths: ['CMakeLists.txt', 'Makefile', '**.h', '*.c', '**.cpp']
1515

16+
env:
17+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
18+
1619
jobs:
1720
ubuntu-latest:
1821
runs-on: ubuntu-latest
@@ -76,7 +79,7 @@ jobs:
7679
id: pack_artifacts
7780
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
7881
run: |
79-
7z a alpaca-bin-win-x64-${{ steps.commit.outputs.short }}.zip .\build\Release\*
82+
7z a alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-x64.zip .\build\Release\*
8083
8184
- name: Create release
8285
id: create_release
@@ -85,7 +88,7 @@ jobs:
8588
env:
8689
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8790
with:
88-
tag_name: ${{ steps.commit.outputs.short }}
91+
tag_name: ${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}
8992

9093
- name: Upload release
9194
id: upload_release
@@ -95,8 +98,8 @@ jobs:
9598
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9699
with:
97100
upload_url: ${{ steps.create_release.outputs.upload_url }}
98-
asset_path: .\alpaca-bin-win-x64-${{ steps.commit.outputs.short }}.zip
99-
asset_name: alpaca-bin-win-x64-${{ steps.commit.outputs.short }}.zip
101+
asset_path: .\alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-x64.zip
102+
asset_name: alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-x64.zip
100103
asset_content_type: application/octet-stream
101104

102105
# ubuntu-latest-gcc:

0 commit comments

Comments
 (0)