Skip to content

Commit 7a4c082

Browse files
committed
Update GitHub actions and add version to sonarqube
1 parent b7e1c62 commit 7a4c082

9 files changed

Lines changed: 40 additions & 38 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
benchmarks:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v5
16+
- uses: actions/checkout@v6
1717
with:
1818
# Disabling shallow clone is recommended for improving relevancy of reporting
1919
fetch-depth: 0
2020
- name: Use Node.js 20.x
21-
uses: actions/setup-node@v5
21+
uses: actions/setup-node@v6
2222
with:
2323
node-version: 22.x
2424
cache: 'yarn'

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
documentation:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v5
11+
- uses: actions/checkout@v6
1212
with:
1313
persist-credentials: false
1414
- uses: docker://daux/daux.io:0.24.0

.github/workflows/node.js.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ jobs:
6464
with:
6565
pattern: reports-*
6666
path: __reports
67-
- run: find . -name "lcov.info"
67+
- run: find __reports -type f
6868
- name: Collect Sonar report paths
6969
id: sonar_reports
7070
run: |
71-
paths=$(find . -name "sonar-report.xml" | tr '\n' ',' | sed 's/,$//')
72-
echo "paths=$paths" >> $GITHUB_OUTPUT
73-
71+
echo "test_reports=$(find . -name "sonar-report.xml" | tr '\n' ',' | sed 's/,$//')" >> $GITHUB_OUTPUT
72+
echo "project_version=$(git tag -l --sort=-creatordate --format='%(refname:short)' | head -n1)" >> $GITHUB_OUTPUT
7473
- name: SonarCloud Scan
75-
uses: SonarSource/sonarqube-scan-action@v6
74+
uses: SonarSource/sonarqube-scan-action@v7
7675
env:
7776
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7877
with:
7978
args: >
80-
-Dsonar.testExecutionReportPaths=${{ steps.sonar_reports.outputs.paths }}
79+
-Dsonar.testExecutionReportPaths=${{ steps.sonar_reports.outputs.test_reports }}
80+
-Dsonar.projectVersion=`${{ steps.sonar_reports.outputs.project_version }}`

.github/workflows/npm-publish.yml

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

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: NPM Publish
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish-npm:
9+
permissions:
10+
contents: read
11+
id-token: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: actions/setup-node@v6
16+
with:
17+
node-version: 22.x
18+
- run: yarn install
19+
- run: yarn build
20+
- run: yarn test
21+
- name: Publish all non-private packages
22+
run: |
23+
yarn workspaces foreach \
24+
--all \
25+
--no-private \
26+
--topological \
27+
npm publish

packages/i18n-types/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"scripts": {
2626
"build": "tsc --noEmit && rslib build",
2727
"format": "biome format index.ts",
28-
"check": "biome check index.ts",
29-
"publish_to_npm": "npm publish"
28+
"check": "biome check index.ts"
3029
}
3130
}

packages/intl-formatters/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"test": "NODE_ICU_DATA=../../node_modules/full-icu && vitest",
3636
"test:ci": "NODE_ICU_DATA=../../node_modules/full-icu && vitest run --coverage",
3737
"format": "biome format src",
38-
"check": "biome check src",
39-
"publish_to_npm": "npm publish"
38+
"check": "biome check src"
4039
}
4140
}

packages/make-plural/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"test": "vitest",
3434
"test:ci": "vitest run --coverage",
3535
"format": "biome format src",
36-
"check": "biome check src",
37-
"publish_to_npm": "npm publish"
36+
"check": "biome check src"
3837
}
3938
}

packages/messageformat/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"test": "vitest",
3636
"test:ci": "vitest run --coverage",
3737
"format": "biome format src",
38-
"check": "biome check src",
39-
"publish_to_npm": "npm publish"
38+
"check": "biome check src"
4039
}
4140
}

0 commit comments

Comments
 (0)