-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (91 loc) · 3.26 KB
/
ci.yml
File metadata and controls
104 lines (91 loc) · 3.26 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
name: CI
on:
pull_request:
push:
branches:
- main
permissions: {}
jobs:
verify:
if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')
name: Verify package
runs-on: ubuntu-latest
timeout-minutes: 20
concurrency:
group: verify-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Vite+
uses: ./.github/actions/setup-vp
with:
node-version-file: ".node-version"
cache: true
- name: Install dependencies
run: vp install
- name: Verify repository
run: vp run verify
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]')
name: Release package
needs:
- verify
runs-on: ubuntu-latest
timeout-minutes: 20
concurrency:
group: release-${{ github.repository }}-main
cancel-in-progress: false
environment:
name: release
deployment: false
permissions:
contents: read
id-token: write
steps:
- name: Create release bot token
id: release-bot
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ vars.PUTIO_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.PUTIO_RELEASE_BOT_PRIVATE_KEY }}
permission-contents: write
permission-issues: write
permission-pull-requests: write
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Vite+
uses: ./.github/actions/setup-vp
with:
node-version-file: ".node-version"
cache: false
- name: Install dependencies
run: vp install
- name: Configure release bot remote
run: git remote set-url origin "https://x-access-token:${RELEASE_BOT_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
env:
RELEASE_BOT_TOKEN: ${{ steps.release-bot.outputs.token }}
- name: Release package
uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6.0.0
with:
extra_plugins: |
@semantic-release/commit-analyzer@13.0.1
@semantic-release/release-notes-generator@14.1.1
@semantic-release/npm@13.1.5
@semantic-release/github@12.0.8
@semantic-release/git@10.0.1
conventional-changelog-conventionalcommits@9.3.1
env:
GITHUB_TOKEN: ${{ steps.release-bot.outputs.token }}
GIT_AUTHOR_NAME: ${{ steps.release-bot.outputs.app-slug }}[bot]
GIT_AUTHOR_EMAIL: ${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: ${{ steps.release-bot.outputs.app-slug }}[bot]
GIT_COMMITTER_EMAIL: ${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com