forked from WasmEdge/WasmEdge
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.72 KB
/
reusable-build-on-alpine-static.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build on Alpine (static lib)
on:
workflow_call:
inputs:
version:
type: string
required: true
release:
type: boolean
permissions:
contents: read
jobs:
build_on_debian_static:
permissions:
contents: write
name: Build on Alpine (static lib)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ensure git safe directory
run: |
git config --global --add safe.directory $(pwd)
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build WasmEdge
uses: docker/bake-action@v4
with:
files: ./utils/docker/docker-bake.alpine-static.hcl
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: static-libs
path: ./build/*/WasmEdge-*.tar.gz
- name: Upload package tarball
if: ${{ inputs.release }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
type -p curl >/dev/null || (apt update && apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update \
&& apt install gh -y
gh release upload ${{ inputs.version }} ./build/*/WasmEdge-*.tar.gz --clobber