Skip to content

Commit

Permalink
Update missing logic to move file to gh actions runner
Browse files Browse the repository at this point in the history
  • Loading branch information
FranzGB committed Oct 18, 2024
1 parent e5774c6 commit 138810e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,25 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Copy static binary
run: |
docker run \
--entrypoint cp \
--volume $PWD/bin:/root/bin \
${{ github.repository }} \
/usr/local/bin/hap \
/root/bin/hap-${{ github.ref_name }}-linux-x86_64-bin
- name: Change owner before compression
run: sudo chown $USER:$USER /usr/local/bin/hap
run: sudo chown $USER:$USER bin/hap-${{ github.ref_name }}-linux-x86_64-bin

- name: Compress binary
uses: svenstaro/upx-action@v2
with:
file: /usr/local/bin/hap
file: bin/hap-${{ github.ref_name }}-linux-x86_64-bin
args: --best --lzma
strip: true

- name: Rename binary file
run: cp /usr/local/bin/hap bin/hap-${{ github.ref_name }}-linux-x86_64-bin

- name: Create draft release
uses: softprops/action-gh-release@v1
with:
Expand Down

0 comments on commit 138810e

Please sign in to comment.