-
Notifications
You must be signed in to change notification settings - Fork 27
78 lines (72 loc) · 3.04 KB
/
release.yml
File metadata and controls
78 lines (72 loc) · 3.04 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Create Release
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
build-macos:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- run: |
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
echo "WASMKIT_VERSION=${VERSION}" >> "$GITHUB_ENV"
- run: ./Utilities/build-release.py -o wasmkit-x86_64-apple-macos.tar.gz -s $WASMKIT_VERSION -- --triple x86_64-apple-macos
- run: ./Utilities/build-release.py -o wasmkit-arm64-apple-macos.tar.gz -s $WASMKIT_VERSION -- --triple arm64-apple-macos
- uses: actions/upload-artifact@v7
with:
name: release-wasmkit-x86_64-apple-macos
path: wasmkit-x86_64-apple-macos.tar.gz
- uses: actions/upload-artifact@v7
with:
name: release-wasmkit-arm64-apple-macos
path: wasmkit-arm64-apple-macos.tar.gz
build-musl:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Configure container
run: |
docker run -dit --name build-container -v $PWD:/workspace -w /workspace swift:6.0.1-jammy
echo 'docker exec -i build-container "$@"' > ./build-exec
chmod +x ./build-exec
- name: Install Static Linux SDK
run: ./build-exec swift sdk install "https://download.swift.org/swift-6.0.1-release/static-sdk/swift-6.0.1-RELEASE/swift-6.0.1-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz" --checksum "d4f46ba40e11e697387468e18987ee622908bc350310d8af54eb5e17c2ff5481"
- name: Install LLVM tools
run: |
./build-exec apt-get update
./build-exec apt-get install -y llvm-15
./build-exec ln -s /usr/bin/llvm-strip-15 /usr/bin/llvm-strip
- run: |
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
echo "WASMKIT_VERSION=${VERSION}" >> "$GITHUB_ENV"
- run: ./build-exec ./Utilities/build-release.py -o wasmkit-x86_64-swift-linux-musl.tar.gz -s $WASMKIT_VERSION -- --swift-sdk x86_64-swift-linux-musl
- run: ./build-exec ./Utilities/build-release.py -o wasmkit-aarch64-swift-linux-musl.tar.gz -s $WASMKIT_VERSION -- --swift-sdk aarch64-swift-linux-musl
- uses: actions/upload-artifact@v7
with:
name: release-wasmkit-x86_64-swift-linux-musl
path: wasmkit-x86_64-swift-linux-musl.tar.gz
- uses: actions/upload-artifact@v7
with:
name: release-wasmkit-aarch64-swift-linux-musl
path: wasmkit-aarch64-swift-linux-musl.tar.gz
create-release:
needs:
- build-macos
- build-musl
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v8
with:
pattern: release-wasmkit-*
path: ./release/
- name: Create Release
run: |
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
echo "Creating release $VERSION"
gh release create $VERSION --title $VERSION --notes "Release $VERSION" ./release/release-wasmkit-*/wasmkit-*.tar.gz
env:
GH_TOKEN: ${{ github.token }}