Skip to content

Commit

Permalink
ci: Fix the branch name for pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
adierking committed Sep 4, 2024
1 parent 2e4ebe5 commit 2a98a0d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
CARGO_TERM_COLOR: always
stable_toolchain: 1.74.1
nightly_toolchain: nightly-2023-12-04
branch_name: ${{ github.base_ref || github.ref_name }}

jobs:
build:
Expand Down Expand Up @@ -76,7 +77,7 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: unplug-${{ github.ref_name }}-${{ matrix.name }}
name: unplug-${{ env.branch_name }}-${{ matrix.name }}
path: target/${{ matrix.target }}/release/${{ matrix.exe-name }}
if-no-files-found: error

Expand All @@ -88,27 +89,27 @@ jobs:
- name: Download ARM Build
uses: actions/download-artifact@v3
with:
name: unplug-${{ github.ref_name }}-macos-arm64
name: unplug-${{ env.branch_name }}-macos-arm64
path: arm64
- name: Download x64 Build
uses: actions/download-artifact@v3
with:
name: unplug-${{ github.ref_name }}-macos-x64
name: unplug-${{ env.branch_name }}-macos-x64
path: x64
- name: Run Lipo
run: lipo arm64/unplug x64/unplug -create -output unplug
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: unplug-${{ github.ref_name }}-macos-universal
name: unplug-${{ env.branch_name }}-macos-universal
path: unplug
if-no-files-found: error
- name: Delete Intermediate Artifacts
uses: geekyeggo/delete-artifact@v2
with:
name: |
unplug-${{ github.ref_name }}-macos-arm64
unplug-${{ github.ref_name }}-macos-x64
unplug-${{ env.branch_name }}-macos-arm64
unplug-${{ env.branch_name }}-macos-x64
failOnError: false

test:
Expand Down

0 comments on commit 2a98a0d

Please sign in to comment.