-
Notifications
You must be signed in to change notification settings - Fork 11
91 lines (85 loc) · 2.7 KB
/
release.yaml
File metadata and controls
91 lines (85 loc) · 2.7 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
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Release
on:
push:
tags:
- liwan-v[0-9]+.*
jobs:
create-release:
permissions:
contents: write
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: taiki-e/create-gh-release-action@c5baa0b5dc700cf06439d87935e130220a6882d9 # v1.9.3
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-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest
no-cache: true
- name: Build web project
run: |
bun install
bun run build
working-directory: ./web
- name: Upload web assets
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
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-24.04
build-tool: cargo-zigbuild
- target: aarch64-unknown-linux-musl
os: ubuntu-24.04
build-tool: cargo-zigbuild
- target: aarch64-apple-darwin
os: macos-latest
build-tool: cargo
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: web-dist
path: ./web/dist
- uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4
with:
cache: false
- uses: taiki-e/upload-rust-binary-action@0e34102c043ded9f2ca39f7af5cd99a540c61aff # v1.29.1
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 }}