-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.19 KB
/
release.yaml
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
name: Publish Package
on:
push:
tags:
- "v*"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Get tag version
id: get_tag_version
run: echo "::set-output name=tag_version::${GITHUB_REF#refs/tags/}"
- name: Update package.json version
run: |
cd projects/layout-components
npm version --no-git-tag-version ${{ steps.get_tag_version.outputs.tag_version }}
git config --global user.name "nemobot"
git config --global user.email "[email protected]"
git add package.json
git commit -m "Update package version"
git push origin HEAD:main
- name: Build package
run: npm run ng build layout-components
- name: Publish package
run: |
cd dist/layout-components
npm publish --access public --scope @buildo
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}