Skip to content

Commit d598c0d

Browse files
authored
CI: add wamr_wasi_extensions to the release assets (#4425)
you can find an example of the release asset at: https://github.com/yamt/wasm-micro-runtime/releases/download/WAMR-2.3.999/wamr-wasi-extensions-2.3.999.zip note: this is a static library for wasm32-wasi. no need to provide per host OS (macOS, ubuntu, etc) binaries.
1 parent da6019f commit d598c0d

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright (C) 2019 Intel Corporation. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
4+
name: build wamr_wasi_extensions release
5+
6+
on:
7+
workflow_call:
8+
inputs:
9+
upload_url:
10+
description: upload binary assets to the URL of release
11+
type: string
12+
required: false
13+
ver_num:
14+
description: a semantic version number. it is required when `release` is true.
15+
type: string
16+
required: false
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
build_wamr_wasi_extensions:
23+
runs-on: ${{ matrix.os }}
24+
permissions:
25+
contents: write # for uploading release artifacts
26+
strategy:
27+
matrix:
28+
os: [ubuntu-22.04]
29+
steps:
30+
- name: checkout
31+
uses: actions/checkout@v4
32+
33+
- name: install-wasi-sdk-wabt
34+
uses: ./.github/actions/install-wasi-sdk-wabt
35+
with:
36+
os: ${{ matrix.os }}
37+
38+
- name: Build wamr-wasi-extensions
39+
run: |
40+
mkdir dist
41+
./build_libs.sh $(pwd)/dist/wamr-wasi-extensions
42+
working-directory: wamr-wasi-extensions
43+
44+
- name: Compress the binary
45+
run: |
46+
zip -r wamr-wasi-extensions-${{ inputs.ver_num }}.zip wamr-wasi-extensions
47+
working-directory: wamr-wasi-extensions/dist
48+
49+
- name: Upload release zip
50+
uses: actions/upload-release-asset@v1
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
with:
54+
upload_url: ${{ inputs.upload_url }}
55+
asset_path: wamr-wasi-extensions/dist/wamr-wasi-extensions-${{ inputs.ver_num }}.zip
56+
asset_name: wamr-wasi-extensions-${{ inputs.ver_num }}.zip
57+
asset_content_type: application/zip

.github/workflows/release_process.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,12 @@ jobs:
239239
arch: universal
240240
upload_url: ${{ needs.create_release.outputs.upload_url }}
241241
ver_num: ${{ needs.create_tag.outputs.new_ver}}
242+
243+
release_wamr_wasi_extensions:
244+
permissions:
245+
contents: write # upload release artifact
246+
needs: [create_tag, create_release]
247+
uses: ./.github/workflows/build_wamr_wasi_extensions.yml
248+
with:
249+
upload_url: ${{ needs.create_release.outputs.upload_url }}
250+
ver_num: ${{ needs.create_tag.outputs.new_ver }}

0 commit comments

Comments
 (0)