-
-
Notifications
You must be signed in to change notification settings - Fork 142
58 lines (47 loc) · 1.29 KB
/
build-frontend.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
name: Build Frontend
run-name: Build Frontend and Publish
on:
repository_dispatch:
types: [artalk-release]
jobs:
build_publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./ui # set for building frontend
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Checkout latest tag
run: |
git fetch --prune --unshallow --tags -f
git checkout $(git describe --tags --abbrev=0)
- name: Use pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
cache-dependency-path: './ui/pnpm-lock.yaml'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Publish
run: pnpm publish -F artalk --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# GitHub Packages
#
# Setup .npmrc file to publish to GitHub Packages
# - uses: actions/setup-node@v2
# with:
# registry-url: 'https://npm.pkg.github.com'
# # Publish to GitHub Packages
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}