Skip to content

Commit 1b4ffdb

Browse files
committed
Distribute release binary in an archive
The release workflow builds the tool and uploads the binary as a release asset. That asset is used by the indexer job and also may be convenient to those who would like to test the release without setting up a build system locally. Previously, the binary was uploaded directly to the release. This caused the executable permissions to be lost, causing inconvenience and potential confusion for the consumers. This can be avoided by packaging the binary in an archive. As an added benefit, the download size is decreased.
1 parent 74efdf6 commit 1b4ffdb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ 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"
1617
echo "CHANGELOG_PATH=${{ runner.temp }}/CHANGELOG.md" >> "$GITHUB_ENV"
1718
1819
- name: Checkout repository
@@ -34,6 +35,15 @@ jobs:
3435
- name: Build project
3536
run: task build
3637

38+
- name: Archive release binary
39+
run: |
40+
tar \
41+
--create \
42+
--add-file="./libraries-repository-engine" \
43+
--add-file="./LICENSE.txt" \
44+
--gzip \
45+
--file="${{ env.ARCHIVE_PATH }}"
46+
3747
- name: Create changelog
3848
uses: arduino/create-changelog@v1
3949
with:
@@ -63,4 +73,4 @@ jobs:
6373
token: ${{ secrets.GITHUB_TOKEN }}
6474
bodyFile: ${{ env.CHANGELOG_PATH }}
6575
prerelease: ${{ steps.prerelease.outputs.is-pre }}
66-
artifacts: libraries-repository-engine
76+
artifacts: ${{ env.ARCHIVE_PATH }}

0 commit comments

Comments
 (0)