-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (55 loc) · 1.84 KB
/
release.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
52
53
54
55
56
57
58
59
60
61
62
63
name: Release
on:
workflow_dispatch: # manual trigger release
inputs:
create_release:
description: 'Create new release'
required: true
type: boolean
release_version:
description: "Version (e.g. 1.0.0)"
required: true
type: string
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Clone project
id: checkout
uses: actions/checkout@v3
- name: Setup rustup
id: rustup
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-wasip1
- name: Build sd-api-server
id: build_sd_api_server
env:
RUSTFLAGS: "--cfg wasmedge --cfg tokio_unstable"
run: |
cargo clean
cargo build --target wasm32-wasip1 --release
cp target/wasm32-wasip1/release/sd-api-server.wasm ./sd-api-server.wasm
- name: Calculate checksum
id: checksum
run: |
sha256sum *.wasm > SHA256SUM
echo "Debug info(SHA256SUM):"
cat SHA256SUM
- name: Tag and release names
id: tag_and_release_names
run: |
echo "tag_name=${{ github.event.inputs.release_version }}" >> $GITHUB_OUTPUT
echo "release_name=LlamaEdge-StableDiffusion ${{ github.event.inputs.release_version }}" >> $GITHUB_OUTPUT
- name: Create Release and Upload Release Asset
if: ${{ github.event.inputs.create_release == 'true' && github.ref == 'refs/heads/main'}}
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.tag_and_release_names.outputs.release_name }}
tag_name: ${{ steps.tag_and_release_names.outputs.tag_name }}
body: TODO New Release.
draft: true
prerelease: true
files: |
sd-api-server.wasm
SHA256SUM