-
-
Notifications
You must be signed in to change notification settings - Fork 87
45 lines (39 loc) · 1.08 KB
/
release-addon.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
name: Release Addon
on:
push:
paths:
- 'packages/valaxy-addon-*/package.json'
permissions:
contents: write
id-token: write
jobs:
release-addon:
if: contains(github.event.head_commit.message, 'release(addon-')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: true
# after pnpm
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: https://registry.npmjs.org/
cache: pnpm
- name: Publish Addon
run: |
COMMIT_MSG="${{ github.event.head_commit.message }}"
PATTERN="release(addon-*): *"
if [[ $COMMIT_MSG == $PATTERN ]]; then
ADDON_NAME=$(echo $COMMIT_MSG | cut -d'(' -f2 | cut -d')' -f1)
cd packages/valaxy-$ADDON_NAME
npm publish
fi
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true