Skip to content

Commit c574489

Browse files
committed
simplify release job
1 parent 3c4b3d5 commit c574489

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

.github/workflows/release.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -105,44 +105,44 @@ jobs:
105105
./ic-wasm --version
106106
107107
publish:
108-
# Check if the workflow was triggered by a tag
109-
if: startsWith(github.ref, 'refs/tags/')
110-
needs: test
111-
name: Publish ${{ matrix.asset_name }}
112-
strategy:
113-
fail-fast: false
114-
matrix:
115-
include:
116-
- asset_name: ic-wasm-linux64
117-
binstall_name: ic-wasm-x86_64-unknown-linux-gnu.tar.gz
118-
- asset_name: ic-wasm-linux-musl
119-
binstall_name: ic-wasm-x86_64-unknown-linux-musl.tar.gz
120-
- asset_name: ic-wasm-macos
121-
binstall_name: ic-wasm-x86_64-apple-darwin.tar.gz
108+
name: GitHub Release
122109
runs-on: ubuntu-latest
110+
needs: test
123111
steps:
124-
- name: Get executable
112+
- name: Get executables
125113
uses: actions/download-artifact@v4
126-
with:
127-
name: ${{ matrix.asset_name }}
128-
129-
- name: Upload binaries to release
130-
uses: svenstaro/upload-release-action@v2
131-
with:
132-
repo_token: ${{ secrets.GITHUB_TOKEN }}
133-
file: ic-wasm
134-
asset_name: ${{ matrix.asset_name }}
135-
tag: ${{ github.ref }}
114+
# Download all artifacts, files will be at:
115+
# ic-wasm-linux64/ic-wasm
116+
# ic-wasm-linux-musl/ic-wasm
117+
# ic-wasm-macos/ic-wasm
136118

137-
- name: Bundle for binstall
119+
- name: Prepare artifacts
138120
run: |
121+
mkdir artifacts
122+
123+
pushd ic-wasm-linux64
124+
chmod +x ic-wasm
125+
tar -cvzf ic-wasm-x86_64-unknown-linux-gnu.tar.gz ic-wasm
126+
mv ic-wasm ic-wasm-linux64
127+
mv * ../artifacts
128+
popd
129+
130+
pushd ic-wasm-linux-musl
131+
chmod +x ic-wasm
132+
tar -cvzf ic-wasm-x86_64-unknown-linux-musl.tar.gz ic-wasm
133+
mv ic-wasm ic-wasm-linux-musl
134+
mv * ../artifacts
135+
popd
136+
137+
pushd ic-wasm-macos
139138
chmod +x ic-wasm
140-
tar -cvzf ${{ matrix.binstall_name }} ic-wasm
139+
tar -cvzf ic-wasm-x86_64-apple-darwin.tar.gz ic-wasm
140+
mv ic-wasm ic-wasm-macos
141+
mv * ../artifacts
142+
popd
141143
142-
- name: Upload binstall binaries to release
143-
uses: svenstaro/upload-release-action@v2
144+
- name: Create GitHub Release
145+
uses: softprops/action-gh-release@v2
144146
with:
145-
repo_token: ${{ secrets.GITHUB_TOKEN }}
146-
file: ${{ matrix.binstall_name }}
147-
asset_name: ${{ matrix.binstall_name }}
148-
tag: ${{ github.ref }}
147+
token: ${{ secrets.GITHUB_TOKEN }}
148+
files: artifacts/*

0 commit comments

Comments
 (0)