Skip to content

Commit 347c137

Browse files
committed
ci: Merge workflows together
1 parent d74c046 commit 347c137

2 files changed

Lines changed: 35 additions & 49 deletions

File tree

.github/workflows/release-npm.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,48 @@ jobs:
1919
- name: Checkout code
2020
uses: actions/checkout@v4
2121

22+
- name: Cache node modules
23+
id: cache
24+
uses: actions/cache@v3
25+
with:
26+
path: |
27+
~/.cache
28+
**/node_modules
29+
key: cache-node-modules-${{ hashFiles('yarn.lock') }}
30+
restore-keys: |
31+
cache-node-modules-
32+
33+
- name: Set up Node
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: 20
37+
38+
- name: yarn install
39+
if: steps.cache.outputs.cache-hit != 'true'
40+
shell: bash
41+
run: yarn install --immutable
42+
43+
- name: Build
44+
shell: bash
45+
run: yarn build
46+
2247
- name: Conventional Changelog Action
2348
id: changelog
2449
uses: TriPSs/conventional-changelog-action@v4
2550
with:
2651
github-token: ${{ secrets.github_token }}
2752
skip-on-empty: false
2853

54+
- name: GIT/NPM config
55+
run: |
56+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
57+
env:
58+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
59+
60+
- name: Publish
61+
shell: bash
62+
run: npm publish --access public
63+
2964
- name: Create Release
3065
uses: actions/create-release@v1
3166
env:

0 commit comments

Comments
 (0)