-
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (48 loc) · 1.4 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
name: Release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'pnpm'
- run: pnpm install
- name: Create Release Pull Request or Tag
id: changesets
uses: changesets/action@v1
with:
publish: pnpm changeset tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build templates
if: steps.changesets.outputs.published == 'true'
run: node cli.js
- name: Install uv
if: steps.changesets.outputs.published == 'true'
uses: astral-sh/setup-uv@v3
with:
version: '0.4.27'
- name: Gen APKG
if: steps.changesets.outputs.published == 'true'
run: uv run --frozen release.py
- name: Release
if: steps.changesets.outputs.published == 'true'
uses: ncipollo/[email protected]
with:
artifacts: 'release/*.apkg'
artifactErrorsFailBuild: true
tag: ${{format('v{0}', fromJSON(steps.changesets.outputs.publishedPackages)[0].version)}}
allowUpdates: true
omitBodyDuringUpdate: true