Skip to content

Commit 7f37ad5

Browse files
chore: minor fix in workflow yml
1 parent d1e4698 commit 7f37ad5

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/publish.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,25 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
8-
branches:
9-
- main
107

118
jobs:
129
versioning:
1310
runs-on: ubuntu-latest
1411
steps:
1512
# Checkout the code
1613
- name: Checkout code
17-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1815

1916
# Set up Node.js environment
2017
- name: Set up Node.js
2118
uses: actions/setup-node@v3
2219
with:
2320
node-version: '20'
21+
registry-url: 'https://registry.npmjs.org/'
2422

25-
# Install dependencies
23+
# Install all dependencies (including devDependencies for lint/test/build)
2624
- name: Install dependencies
27-
run: yarn install --frozen-lockfile --production
25+
run: yarn install
2826

2927
# Run linting
3028
- name: Run lint
@@ -43,14 +41,18 @@ jobs:
4341
env:
4442
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4543
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46-
run: |
47-
yarn release
44+
run: yarn release
4845

49-
# Optionally, you can include a job to deploy to npm
5046
publish:
51-
needs: release
47+
needs: versioning
5248
runs-on: ubuntu-latest
5349
steps:
50+
- name: Checkout code
51+
uses: actions/checkout@v3
52+
53+
- name: Install production dependencies
54+
run: yarn install --frozen-lockfile --production
55+
5456
# Publish to npm
5557
- name: Publish to npm
5658
run: yarn publish --non-interactive

0 commit comments

Comments
 (0)