-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (79 loc) · 2.14 KB
/
release.yaml
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
79
80
81
82
83
84
85
name: Release
on:
push:
tags:
- liwan-v[0-9]+.*
jobs:
create-release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: taiki-e/create-gh-release-action@v1.8.2
with:
changelog: CHANGELOG.md
allow-missing-changelog: true
draft: false # has to be public to have the right url's for the docker image
prefix: liwan
token: ${{ secrets.GITHUB_TOKEN }}
build-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Build web project
run: |
bun install
bun run build
working-directory: ./web
- name: Upload web assets
uses: actions/upload-artifact@v4
with:
name: web-dist
path: ./web/dist
upload-assets:
permissions:
contents: write
needs: [create-release, build-web]
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
build-tool: cargo-zigbuild
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
build-tool: cargo-zigbuild
- target: aarch64-apple-darwin
os: macos-latest
build-tool: cargo
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/download-artifact@v4
with:
name: web-dist
path: ./web/dist
- uses: taiki-e/upload-rust-binary-action@v1.23.0
with:
bin: liwan
target: ${{ matrix.target }}
build-tool: ${{ matrix.build-tool }}
token: ${{ secrets.GITHUB_TOKEN }}
publish-container:
permissions:
packages: write
contents: read
needs: [create-release, upload-assets]
uses: explodingcamera/liwan/.github/workflows/container.yaml@main
with:
tag: ${{ github.ref_name }}