Skip to content

Commit ba448eb

Browse files
committed
Pushing binaries to tag
1 parent 24135c2 commit ba448eb

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

.github/workflows/publish.yaml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags:
66
- v*
77

8+
permissions:
9+
contents: write
10+
811
jobs:
912
build:
1013
runs-on: ubuntu-latest
@@ -20,7 +23,7 @@ jobs:
2023

2124
- name: Get Version
2225
id: vars
23-
run: echo ::set-output name=version::$(echo ${{github.ref_name}} | sed 's/^v//')
26+
run: echo "version=$(echo $GITHUB_REF_NAME | sed 's/^v//')" >> $GITHUB_OUTPUT
2427

2528
- name: Write Version file
2629
run: |
@@ -67,12 +70,31 @@ jobs:
6770
--include=VERSION \
6871
--allow-read --allow-write --allow-net main.ts
6972
70-
- name: Release
73+
- name: Configure git
74+
run: |
75+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
76+
git config --local user.name "github-actions[bot]"
77+
78+
- name: Commit and push binaries
79+
run: |
80+
git add bin/
81+
git commit -m "Add compiled binaries for ${{ github.ref_name }}"
82+
git push origin HEAD:${{ github.ref_name }} --force
83+
84+
- name: Compress binaries
85+
run: |
86+
zip staticalize-windows.zip staticalize-windows.exe
87+
88+
tar -czf staticalize-macos.tar.gz staticalize-macos
89+
tar -czf staticalize-macos-arm64.tar.gz staticalize-macos-arm64
90+
tar -czf staticalize-linux.tar.gz staticalize-linux
91+
tar -czf staticalize-linux-arm64.tar.gz staticalize-linux-arm64
92+
93+
- name: Upload to Release
7194
uses: softprops/action-gh-release@v2
7295
with:
7396
token: ${{ secrets.JACK_GITHUB_TOKEN }}
7497
make_latest: true
7598
files: |
76-
bin/*
77-
action.yaml
78-
README.md
99+
bin/*.zip
100+
bin/*.tar.gz

0 commit comments

Comments
 (0)