Skip to content

Commit a601fc2

Browse files
committed
ci: add release workflow
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
1 parent fed60e9 commit a601fc2

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release Artifacts
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
release-artifacts:
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Get last successful run id
15+
id: run-id
16+
env:
17+
GH_TOKEN: ${{ github.token }}
18+
run: |
19+
last_run_id=$(gh run list -w main.yml -c ${{ github.sha }} -b main -s completed --json databaseId -L 1 | jq -r .[].databaseId)
20+
test -z $last_run_id && echo "cannot find last successful run_id" && exit 1 || echo "last_run_id=$last_run_id" && echo "last_run_id=$last_run_id" >> $GITHUB_OUTPUT
21+
22+
- name: Download sysroot (wasm32-wasip1-threads)
23+
uses: actions/download-artifact@v4
24+
env:
25+
LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }}
26+
with:
27+
name: sysroot-wasm32-wasip1-threads.tgz
28+
run-id: ${{ env.LAST_RUN_ID }}
29+
path: sysroot-wasm32-wasip1-threads
30+
github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }}
31+
32+
- name: Push artifacts to release
33+
uses: softprops/action-gh-release@v2
34+
with:
35+
prerelease: false
36+
files: |
37+
sysroot-*

0 commit comments

Comments
 (0)