-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (83 loc) · 3.01 KB
/
Copy pathmain.yml
File metadata and controls
105 lines (83 loc) · 3.01 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: 🚀 Build & Publish
on:
push:
tags:
- 'v*'
permissions:
id-token: write
contents: read
packages: write
jobs:
publish:
name: 📦 Validate, publish & deploy
runs-on: ubuntu-latest
steps:
- name: 🗜️ Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: 🔎 Verify tag targets master
run: test "$GITHUB_SHA" = "$(git rev-parse origin/master)"
- name: 🗜️ Setup Node
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org
- name: 🗜️ Setup Bun
uses: oven-sh/setup-bun@v2
- name: 🗜️ Setup Zig
uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: 🛠️ Install dependencies
uses: ./.github/actions/cached-deps
- name: 🧹 Clean
run: bun run clean
- name: 📦 Validate package
run: bun run package:validate
- name: 🌐 Validate portal
run: bun run portal:validate
- name: 📦 Build cross-platform package
run: bun run package
- name: 🔎 Verify artifact layout
uses: ./.github/actions/verify-artifact-layout
- name: 🚀 Publish npm
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
working-directory: dist/quick-commitlint
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: 🚀 Publish npm beta
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == true
working-directory: dist/quick-commitlint
run: npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: 📦 Create GitHub Packages manifest
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
run: bun run script:package-github
- name: 🗜️ Setup GitHub Packages
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
registry-url: https://npm.pkg.github.com
scope: '@celtian'
- name: 🚀 Publish GitHub Packages
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
working-directory: dist/quick-commitlint
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ github.token }}
- name: 📦 Build portal app
run: bun run portal:build:pages
- name: 🔎 Verify prerendered pages
run: bun run portal:ssg:verify
- name: 🛠️ Copy index.html to 404.html
run: cp ./dist/portal/browser/index.html ./dist/portal/browser/404.html
- name: 🚀 Deploy Github Pages
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./dist/portal/browser