Skip to content

Commit a96d7ec

Browse files
committed
Use tag name in release asset filename
Previously the release asset archive that contains the pre-built `libraries-repository-engine` binary was named like: libraries-repository-engine_Linux_64bit.tar.gz This was inconsistent with the standard established in other Arduino tooling projects, so it should be changed to follow the standard convention of having the tag name in the archive file name: libraries-repository-engine_0.0.2_Linux_64bit.tar.gz
1 parent 798a6b5 commit a96d7ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/release.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ jobs:
1313
- name: Set environment variables
1414
run: |
1515
# See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
16-
echo "ARCHIVE_PATH=${{ runner.temp }}/libraries-repository-engine_Linux_64bit.tar.gz" >> "$GITHUB_ENV"
16+
TAG_SHORT_NAME="${GITHUB_REF/refs\/tags\//}"
17+
echo "TAG_SHORT_NAME=$TAG_SHORT_NAME" >> "$GITHUB_ENV"
18+
echo "ARCHIVE_PATH=${{ runner.temp }}/libraries-repository-engine_${TAG_SHORT_NAME}_Linux_64bit.tar.gz" >> "$GITHUB_ENV"
1719
echo "CHANGELOG_PATH=${{ runner.temp }}/CHANGELOG.md" >> "$GITHUB_ENV"
1820
1921
- name: Checkout repository
@@ -63,7 +65,7 @@ jobs:
6365
wget --quiet --directory-prefix="$INSTALL_PATH" https://github.com/fsaintjacques/semver-tool/archive/${{ env.TOOL_VERSION }}.zip
6466
unzip -p "${INSTALL_PATH}/${{ env.TOOL_VERSION }}.zip" semver-tool-${{ env.TOOL_VERSION }}/src/semver >"${INSTALL_PATH}/semver"
6567
chmod +x "${INSTALL_PATH}/semver"
66-
if [[ $("${INSTALL_PATH}/semver" get prerel "${GITHUB_REF/refs\/tags\//}") ]]; then
68+
if [[ $("${INSTALL_PATH}/semver" get prerel "${{ env.TAG_SHORT_NAME }}") ]]; then
6769
echo "::set-output name=is-pre::true";
6870
fi
6971

0 commit comments

Comments
 (0)