Skip to content

Commit

Permalink
ci: try to add compression
Browse files Browse the repository at this point in the history
  • Loading branch information
stevana committed Oct 22, 2024
1 parent 123ad3f commit 8201343
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ jobs:
${HOME}/.cache/cabal/packages
${HOME}/.cabal/store
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key }}-

# ${{ github.workspace }}/dist-newstyle
#${{ github.workspace }}/dist-newstyle
#restore-keys: ${{ env.key }}-plan-


- name: Install dependencies
# If we had an exact cache hit, the dependencies will be up to date.
Expand Down Expand Up @@ -188,14 +189,23 @@ jobs:
"${{ github.workspace }}/bin"
ls -R "${{github.workspace }}/bin" || true
- name: Compress binaries
run: |
docker run \
--volume "${{ github.workspace }}/bin":/mnt/ \
--entrypoint=upx \
ghcr.io/spex-lang/static-build:9.6.6 \
--best -q /mnt/spex
- name: Create new git tag, if merge to main and .cabal version is bumped
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: sol/haskell-autotag@v1
id: autotag

- name: Release
run: |
gh release create --draft --notes-file=CHANGELOG.md "${{ github.workspace }}/bin/*"
gh release create --draft --notes-file=CHANGELOG.md \
${{ steps.autotag.outputs.version }} "${{ github.workspace }}/bin/*"
# uses: softprops/action-gh-release@v2
# # if: steps.autotag.outputs.created
# with:
Expand Down
1 change: 1 addition & 0 deletions release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ RUN apk upgrade --no-cache \
libffi-dev \
musl-dev \
ncurses-dev \
upx \
zlib-dev \
zlib-static \
&& git config --global --add safe.directory /mnt
Expand Down

0 comments on commit 8201343

Please sign in to comment.