Skip to content

Commit e24732f

Browse files
committed
Update GH Actions workflow
1 parent 155cc04 commit e24732f

File tree

1 file changed

+14
-27
lines changed

1 file changed

+14
-27
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ name: CI
22

33
on:
44
push:
5-
branches:
6-
- main
7-
tags:
8-
- 'v*'
5+
branches: ['main']
6+
tags: ['v*']
97
pull_request:
108
branches: ['*']
119

@@ -30,18 +28,18 @@ jobs:
3028
timezone: America/Sao_Paulo
3129

3230
- name: Setup repo
33-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3432

3533
- name: Setup Node
36-
uses: actions/setup-node@v3
34+
uses: actions/setup-node@v4
3735
with:
38-
node-version: 18
36+
node-version: 22
3937
registry-url: 'https://registry.npmjs.org'
4038

4139
- name: Install pnpm
42-
uses: pnpm/action-setup@v2
40+
uses: pnpm/action-setup@v3
4341
with:
44-
version: 8
42+
version: 9
4543
run_install: false
4644

4745
- name: Get pnpm store directory
@@ -50,10 +48,10 @@ jobs:
5048
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
5149
5250
- name: Setup pnpm cache
53-
uses: actions/cache@v3
51+
uses: actions/cache@v4
5452
with:
5553
path: ${{ env.STORE_PATH }}
56-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
54+
key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
5755
restore-keys: |
5856
${{ runner.os }}-pnpm-store-
5957
@@ -66,26 +64,15 @@ jobs:
6664
run: pnpm run validate
6765
timeout-minutes: 3
6866

69-
- name: SonarCloud Scan Base
67+
- name: SonarCloud Scan
7068
if: "!startsWith(github.ref, 'refs/tags/')"
71-
uses: SonarSource/sonarcloud-github-action@master
69+
uses: SonarSource/sonarqube-scan-action@master
7270
env:
7371
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BASE }}
75-
with:
76-
projectBaseDir: packages/tree-changes
77-
78-
- name: SonarCloud Scan Hook
79-
if: "!startsWith(github.ref, 'refs/tags/')"
80-
uses: SonarSource/sonarcloud-github-action@master
81-
env:
82-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_HOOK }}
84-
with:
85-
projectBaseDir: packages/tree-changes-hook
72+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
8673

87-
- name: Publish Packages
74+
- name: Publish Package
8875
if: startsWith(github.ref, 'refs/tags/')
89-
run: lerna publish from-git --no-verify-access --yes
76+
run: npm publish
9077
env:
9178
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)