Skip to content

Commit

Permalink
Refactor build workflow to include version and architecture in execut…
Browse files Browse the repository at this point in the history
…able filename
  • Loading branch information
catallo committed Dec 19, 2023
1 parent b5dceff commit afb033a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/dart_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,20 @@ jobs:
- name: Print version
run: echo "Extracted version is $VERSION"

- run: mkdir out
- run: dart compile exe bin/ht.dart -o out/ht

# Compile executable with version and architecture in filename
- run: |
mkdir -p out
dart compile exe bin/ht.dart -o out/ht_${{ env.VERSION_FORMATTED }}_${{ matrix.archive-suffix }}
# Set executable bit
- run: chmod +x out/ht
- run: chmod +x out/ht_${{ env.VERSION_FORMATTED }}_${{ matrix.archive-suffix }}

# Zip the executable to preserve file permissions
- run: |
cd out
zip -j ht_${{ env.VERSION_FORMATTED }}_${{ matrix.archive-suffix }}.zip ht
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "::set-output name=version::$VERSION"
zip -j ht_${{ env.VERSION_FORMATTED }}_${{ matrix.archive-suffix }}.zip ht_${{ env.VERSION_FORMATTED }}_${{ matrix.archive-suffix }}
# Upload the artifact
- uses: actions/upload-artifact@v2
with:
name: ht_${{ env.VERSION_FORMATTED }}_${{ matrix.archive-suffix }}.zip
Expand Down

0 comments on commit afb033a

Please # to comment.