Skip to content

Commit b6954b5

Browse files
committed
ci: update semantic release
1 parent 72b696c commit b6954b5

File tree

6 files changed

+180
-111
lines changed

6 files changed

+180
-111
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: Publish Packages
22

3-
on: workflow_dispatch
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dry_run:
7+
description: Dry-run
8+
required: false
9+
type: boolean
10+
default: true
411

512
permissions:
613
contents: read
@@ -27,7 +34,7 @@ jobs:
2734
uses: actions/checkout@v5
2835

2936
- name: Install pnpm
30-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
37+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
3138

3239
- name: Setup node
3340
uses: actions/setup-node@v6
@@ -38,16 +45,13 @@ jobs:
3845
- name: Install Dependencies
3946
run: pnpm install --frozen-lockfile --ignore-scripts
4047

41-
- name: Configure .npmrc
42-
run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> .npmrc
43-
44-
- name: Bump version, add tag, and publish github release
48+
- name: Bump versions, add tags, publish packages and create github releases
4549
env:
4650
BRANCH: ${{github.ref_name}}
4751
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4852
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4953
NPM_CONFIG_PROVENANCE: true
50-
run: pnpm recursive run release
54+
run: pnpm exec multi-semantic-release --dry-run=${{ github.event.inputs.dry_run }}
5155

5256
- name: Remove node_modules
5357
run: |

.releaserc.mjs

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { env } from 'node:process'
22

33
const config = {
4-
extends: 'semantic-release-monorepo',
54
branches: [
65
'main',
76
{
@@ -17,33 +16,13 @@ const config = {
1716
],
1817
preset: 'conventionalcommits',
1918
plugins: [
20-
[
21-
'@semantic-release/commit-analyzer',
22-
{
23-
releaseRules: [
24-
{
25-
type: 'docs',
26-
release: 'minor',
27-
},
28-
{
29-
type: 'refactor',
30-
release: 'minor',
31-
},
32-
],
33-
},
34-
],
19+
'@semantic-release/commit-analyzer',
20+
'@semantic-release/release-notes-generator',
21+
'@sebbo2002/semantic-release-jsr',
22+
'@anolilab/semantic-release-pnpm',
3523
],
3624
}
3725

38-
if (env.BRANCH === 'main') {
39-
config.plugins.push('@semantic-release/release-notes-generator')
40-
}
41-
42-
config.plugins.push(
43-
'@sebbo2002/semantic-release-jsr',
44-
'@anolilab/semantic-release-pnpm',
45-
)
46-
4726
if (env.BRANCH === 'main') {
4827
config.plugins.push('@semantic-release/github')
4928
}

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@
5454
"react-toastify": "^11.0.2"
5555
},
5656
"devDependencies": {
57-
"@anolilab/semantic-release-pnpm": "^2.0.5",
57+
"@anolilab/multi-semantic-release": "^3.0.0",
58+
"@anolilab/semantic-release-pnpm": "^3.0.0",
5859
"@chromatic-com/cypress": "^0.11.7",
5960
"@commitlint/cli": "^20.1.0",
6061
"@commitlint/config-conventional": "^20.0.0",
6162
"@cypress/webpack-preprocessor": "^6.0.2",
62-
"@sebbo2002/semantic-release-jsr": "^3.0.0",
63+
"@sebbo2002/semantic-release-jsr": "3.1.0",
6364
"@stryker-mutator/core": "^8.7.1",
6465
"@stryker-mutator/jest-runner": "^8.7.1",
6566
"@stryker-mutator/typescript-checker": "^8.7.1",
@@ -97,7 +98,7 @@
9798
"remark-cli": "^12.0.1",
9899
"sass-embedded": "^1.83.0",
99100
"sass-loader": "^16.0.6",
100-
"semantic-release": "^25.0.1",
101+
"semantic-release": "^25.0.2",
101102
"start-server-and-test": "^2.0.9",
102103
"style-loader": "^4.0.0",
103104
"stylelint": "^16.24.0",

packages/gerador-validador-cnpj/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@
4343
"scripts": {
4444
"pack-extract": "pnpm pack && tar zxvf *.tgz",
4545
"prepack": "pnpm build",
46-
"build": "rm -rf dist && rollup --config",
47-
"release": "semantic-release",
48-
"release:dry-run": "semantic-release --dry-run"
46+
"build": "rm -rf dist && rollup --config"
4947
},
5048
"devDependencies": {
5149
"@jest/globals": "^30.2.0",

packages/gerador-validador-cpf/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@
4141
"scripts": {
4242
"pack-extract": "pnpm pack && tar zxvf *.tgz",
4343
"prepack": "pnpm build",
44-
"build": "rm -rf dist && rollup --config",
45-
"release": "semantic-release",
46-
"release:dry-run": "semantic-release --dry-run"
44+
"build": "rm -rf dist && rollup --config"
4745
},
4846
"devDependencies": {
4947
"@jest/globals": "^30.2.0",

0 commit comments

Comments
 (0)