generated from xhofe/solid-lib
-
Notifications
You must be signed in to change notification settings - Fork 462
90 lines (79 loc) · 2.14 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
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
name: release
on:
push:
tags:
- "*"
jobs:
changelog:
name: Create release changelog
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Generate changelog
run: npx changelogithub # or changelogithub@0.12 if ensure the stable result
env:
GITHUB_TOKEN: ${{secrets.MY_TOKEN}}
release:
needs: changelog
strategy:
matrix:
platform: [ubuntu-latest]
name: Release
runs-on: ${{ matrix.platform }}
steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v2.2.4
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
path: alist-web
persist-credentials: false
fetch-depth: 0
submodules: recursive
- name: Checkout dist repo
uses: actions/checkout@v3
with:
repository: alist-org/web-dist
ref: main
path: web-dist
persist-credentials: false
fetch-depth: 0
- name: Build
run: |
mv alist-web/release.sh .
bash release.sh
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Publish npm
run: |
cd alist-web
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
pnpm publish --no-git-checks
cd ..
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload dist files
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.MY_TOKEN }}
branch: main
directory: web-dist
repository: alist-org/web-dist
- name: Release
uses: softprops/action-gh-release@v1
with:
files: compress/*