-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.51 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
name: NPM Publish
on:
push:
branches:
- main
- issue/*
jobs:
publish:
runs-on: ubuntu-latest
env:
ACTIONS_RUNNER_DEBUG: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
- name: Extract commit message
id: extract_message
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
echo "commit-message=${COMMIT_MESSAGE}" >> $GITHUB_ENV
- name: Check Filigran-icon
if: startsWith(env.commit-message, '[filigran-icon][version]')
run: echo "package=filigran-icon" >> $GITHUB_ENV
- name: Check Filigran-ui
if: startsWith(env.commit-message, '[filigran-ui][version]')
run: echo "package=filigran-ui" >> $GITHUB_ENV
- name: Debug output
run: |
echo "Commit Message: ${{ env.commit-message }}"
echo "Package: ${{ env.package }}"
echo "Version: ${{ env.version }}"
- name: Install dependencies
if: env.package != ''
run: npm install && npm install rimraf --global
- name: Publish Filigran UI
if: env.package == 'filigran-ui'
run: npm run publish:filigran-ui
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Filigran Icon
if: env.package == 'filigran-icon'
run: npm run publish:filigran-icon
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}