Skip to content

Commit

Permalink
Reshape upload naming
Browse files Browse the repository at this point in the history
  • Loading branch information
alexroan committed May 30, 2024
1 parent dae7d3a commit 4f49785
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get Git Commit Description
run: echo "BIN_COMMIT=$(git describe --tags)" >> $GITHUB_ENV

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand All @@ -55,21 +58,11 @@ jobs:
if [[ "${{ matrix.runner }}" == "windows-latest" ]]; then
BIN_SUFFIX=".exe"
fi
# The built binary output location
BIN_OUTPUT="target/${{ matrix.target }}/release/${PROJECT_NAME}${BIN_SUFFIX}"

# Define a better name for the final binary
BIN_COMMIT=$(git describe --tags)
BIN_RELEASE="${PROJECT_NAME}-${{ matrix.name }}${BIN_SUFFIX}"
BIN_RELEASE_VERSIONED="${PROJECT_NAME}-${{ github.ref_name }}-${{ matrix.name }}-${BIN_COMMIT}${BIN_SUFFIX}"

# Move the built binary where you want it
ls -la
mv "${BIN_OUTPUT}" "./${BIN_RELEASE}"

# Export BIN_RELEASE to GITHUB_ENV
echo "BIN_RELEASE=${BIN_RELEASE}" >> $GITHUB_ENV
BIN_RELEASE_VERSIONED="${PROJECT_NAME}-${{ github.ref_name }}-${{ matrix.name }}-${{ env.BIN_COMMIT }}${BIN_SUFFIX}"
mv "${BIN_OUTPUT}" "./${BIN_RELEASE_VERSIONED}"
echo "BIN_RELEASE_VERSIONED=${BIN_RELEASE_VERSIONED}" >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit 4f49785

Please sign in to comment.