This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (82 loc) · 2.32 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
91
92
93
94
95
96
97
98
99
100
name: Release
on:
pull_request:
branches:
- main
types:
- closed
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
vue3:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
environment: Production
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
scope: '@mytiki'
- name: Build for Vue 3
run: make vue3
- name: Get version
id: version
run: echo "current=$(npm pkg get version | tr -d '"')" >> $GITHUB_OUTPUT
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build Docs
run: npx typedoc src/main.ts --skipErrorChecking
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
- name: Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.version.outputs.current }}
vue2:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
environment: Production
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
scope: '@mytiki'
- name: Build for Vue 2
run: make vue2
- name: Get version
id: version
run: echo "current=$(npm pkg get version | tr -d '"')" >> $GITHUB_OUTPUT
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}