Skip to content

Commit

Permalink
fix(release): remove auth-token from actions/setup-node@v4 and use en…
Browse files Browse the repository at this point in the history
…v for publish (#1888)

* fix(release): remove auth-token from actions/setup-node@v4 and set env for publishing

* docs(release): update
  • Loading branch information
nstuyvesant authored Sep 8, 2024
1 parent d9c5496 commit 5bcb140
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 95 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ on:

jobs:
build:
if: github.actor != 'carbon-bot' && !startsWith(github.event.head_commit.message, 'skip-release')
if:
github.actor != 'carbon-bot' && !startsWith(github.event.head_commit.message, 'skip-release')
name: Create release
runs-on: ubuntu-latest

env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
Expand All @@ -27,33 +32,27 @@ jobs:
with:
node-version: '20.x'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org/'
always-auth: true
auth-token: ${{ secrets.NPM_TOKEN }}

- name: Install dependencies 🔧
run: yarn install --immutable --check-cache

- name: Generate search index for docs website
run: lerna run build:search --scope @carbon/charts-docs # should be committed in next step
run: lerna run build:search --scope @carbon/charts-docs # committed by lerna version

- name: Create version and change logs and commit to master
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx lerna version --yes --force-publish --conventional-commits --create-release github

- name: Build latest version's packages (including angular/dist) 🔧
run: |
yarn build
node scripts/update-angular-dependency-version.mjs
- name: Publish to npmjs registry and Github
- name: Publish to npmjs registry and create Github release
run: npx lerna publish from-git --yes --force-publish

- name: Deploy documentation to Github Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GH_TOKEN }}
branch: gh-pages # Branch for GitHub Pages
folder: pages # Folder containing documentation website
clean: true # Remove deleted files from the deploy branch
2 changes: 1 addition & 1 deletion packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@carbon/icons": "^11.48.0",
"@playwright/test": "^1.47.0",
"angular-eslint": "^18.3.0",
"concurrently": "^8.2.2",
"concurrently": "^9.0.0",
"eslint": "^9.10.0",
"ng-packagr": "^18.2.1",
"prettier": "^3.3.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"@types/dompurify": "^3.0.5",
"@types/lodash-es": "^4.17.12",
"@types/node": "^22.5.4",
"concurrently": "^8.2.2",
"concurrently": "^9.0.0",
"downlevel-dts": "^0.11.0",
"eslint": "^9.10.0",
"jsdom": "^25.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"classnames": "^2.5.1",
"concurrently": "^8.2.2",
"concurrently": "^9.0.0",
"downlevel-dts": "^0.11.0",
"eslint": "^9.10.0",
"prettier": "^3.3.3",
Expand Down
148 changes: 65 additions & 83 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.15, @babel/runtime@npm:^7.24.7, @babel/runtime@npm:^7.8.4":
"@babel/runtime@npm:^7.22.15, @babel/runtime@npm:^7.24.7, @babel/runtime@npm:^7.8.4":
version: 7.25.6
resolution: "@babel/runtime@npm:7.25.6"
dependencies:
Expand Down Expand Up @@ -1869,7 +1869,7 @@ __metadata:
"@ibm/telemetry-js": "npm:^1.6.1"
"@playwright/test": "npm:^1.47.0"
angular-eslint: "npm:^18.3.0"
concurrently: "npm:^8.2.2"
concurrently: "npm:^9.0.0"
eslint: "npm:^9.10.0"
ng-packagr: "npm:^18.2.1"
prettier: "npm:^3.3.3"
Expand Down Expand Up @@ -1959,7 +1959,7 @@ __metadata:
"@types/react-dom": "npm:^18.3.0"
"@vitejs/plugin-react-swc": "npm:^3.7.0"
classnames: "npm:^2.5.1"
concurrently: "npm:^8.2.2"
concurrently: "npm:^9.0.0"
downlevel-dts: "npm:^0.11.0"
eslint: "npm:^9.10.0"
prettier: "npm:^3.3.3"
Expand Down Expand Up @@ -2036,7 +2036,7 @@ __metadata:
"@types/node": "npm:^22.5.4"
"@types/topojson": "npm:^3.2.6"
carbon-components: "npm:^10.58.15"
concurrently: "npm:^8.2.2"
concurrently: "npm:^9.0.0"
d3: "npm:^7.9.0"
d3-cloud: "npm:^1.2.7"
d3-sankey: "npm:^0.12.3"
Expand Down Expand Up @@ -4790,90 +4790,90 @@ __metadata:
languageName: node
linkType: hard

"@swc/core-darwin-arm64@npm:1.7.23":
version: 1.7.23
resolution: "@swc/core-darwin-arm64@npm:1.7.23"
"@swc/core-darwin-arm64@npm:1.7.24":
version: 1.7.24
resolution: "@swc/core-darwin-arm64@npm:1.7.24"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"@swc/core-darwin-x64@npm:1.7.23":
version: 1.7.23
resolution: "@swc/core-darwin-x64@npm:1.7.23"
"@swc/core-darwin-x64@npm:1.7.24":
version: 1.7.24
resolution: "@swc/core-darwin-x64@npm:1.7.24"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"@swc/core-linux-arm-gnueabihf@npm:1.7.23":
version: 1.7.23
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.7.23"
"@swc/core-linux-arm-gnueabihf@npm:1.7.24":
version: 1.7.24
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.7.24"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard

"@swc/core-linux-arm64-gnu@npm:1.7.23":
version: 1.7.23
resolution: "@swc/core-linux-arm64-gnu@npm:1.7.23"
"@swc/core-linux-arm64-gnu@npm:1.7.24":
version: 1.7.24
resolution: "@swc/core-linux-arm64-gnu@npm:1.7.24"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard

"@swc/core-linux-arm64-musl@npm:1.7.23":
version: 1.7.23
resolution: "@swc/core-linux-arm64-musl@npm:1.7.23"
"@swc/core-linux-arm64-musl@npm:1.7.24":
version: 1.7.24
resolution: "@swc/core-linux-arm64-musl@npm:1.7.24"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard

"@swc/core-linux-x64-gnu@npm:1.7.23":
version: 1.7.23
resolution: "@swc/core-linux-x64-gnu@npm:1.7.23"
"@swc/core-linux-x64-gnu@npm:1.7.24":
version: 1.7.24
resolution: "@swc/core-linux-x64-gnu@npm:1.7.24"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard

"@swc/core-linux-x64-musl@npm:1.7.23":
version: 1.7.23
resolution: "@swc/core-linux-x64-musl@npm:1.7.23"
"@swc/core-linux-x64-musl@npm:1.7.24":
version: 1.7.24
resolution: "@swc/core-linux-x64-musl@npm:1.7.24"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard

"@swc/core-win32-arm64-msvc@npm:1.7.23":
version: 1.7.23
resolution: "@swc/core-win32-arm64-msvc@npm:1.7.23"
"@swc/core-win32-arm64-msvc@npm:1.7.24":
version: 1.7.24
resolution: "@swc/core-win32-arm64-msvc@npm:1.7.24"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"@swc/core-win32-ia32-msvc@npm:1.7.23":
version: 1.7.23
resolution: "@swc/core-win32-ia32-msvc@npm:1.7.23"
"@swc/core-win32-ia32-msvc@npm:1.7.24":
version: 1.7.24
resolution: "@swc/core-win32-ia32-msvc@npm:1.7.24"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard

"@swc/core-win32-x64-msvc@npm:1.7.23":
version: 1.7.23
resolution: "@swc/core-win32-x64-msvc@npm:1.7.23"
"@swc/core-win32-x64-msvc@npm:1.7.24":
version: 1.7.24
resolution: "@swc/core-win32-x64-msvc@npm:1.7.24"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard

"@swc/core@npm:^1.5.7":
version: 1.7.23
resolution: "@swc/core@npm:1.7.23"
dependencies:
"@swc/core-darwin-arm64": "npm:1.7.23"
"@swc/core-darwin-x64": "npm:1.7.23"
"@swc/core-linux-arm-gnueabihf": "npm:1.7.23"
"@swc/core-linux-arm64-gnu": "npm:1.7.23"
"@swc/core-linux-arm64-musl": "npm:1.7.23"
"@swc/core-linux-x64-gnu": "npm:1.7.23"
"@swc/core-linux-x64-musl": "npm:1.7.23"
"@swc/core-win32-arm64-msvc": "npm:1.7.23"
"@swc/core-win32-ia32-msvc": "npm:1.7.23"
"@swc/core-win32-x64-msvc": "npm:1.7.23"
version: 1.7.24
resolution: "@swc/core@npm:1.7.24"
dependencies:
"@swc/core-darwin-arm64": "npm:1.7.24"
"@swc/core-darwin-x64": "npm:1.7.24"
"@swc/core-linux-arm-gnueabihf": "npm:1.7.24"
"@swc/core-linux-arm64-gnu": "npm:1.7.24"
"@swc/core-linux-arm64-musl": "npm:1.7.24"
"@swc/core-linux-x64-gnu": "npm:1.7.24"
"@swc/core-linux-x64-musl": "npm:1.7.24"
"@swc/core-win32-arm64-msvc": "npm:1.7.24"
"@swc/core-win32-ia32-msvc": "npm:1.7.24"
"@swc/core-win32-x64-msvc": "npm:1.7.24"
"@swc/counter": "npm:^0.1.3"
"@swc/types": "npm:^0.1.12"
peerDependencies:
Expand Down Expand Up @@ -4902,7 +4902,7 @@ __metadata:
peerDependenciesMeta:
"@swc/helpers":
optional: true
checksum: 10c0/9b363e8fa0639b52eeec5243ebea56fb7d3ceb9e6207c173b34836ee8764cb6740bff2bd6983940a3cda395ef9244390f1bfd9e7b49ebc7249bbe9ad6c318f34
checksum: 10c0/440dbef78a8dc1cd9e3db114e91e517751a0f1ba996b128347d6305014233a91cb815105aa8133bdb7a204ed9566a5e2df1a5b5a9d87ce454c6afe87861f311b
languageName: node
linkType: hard

Expand Down Expand Up @@ -5940,30 +5940,30 @@ __metadata:
languageName: node
linkType: hard

"@volar/language-core@npm:2.4.2, @volar/language-core@npm:~2.4.0-alpha.18, @volar/language-core@npm:~2.4.1":
version: 2.4.2
resolution: "@volar/language-core@npm:2.4.2"
"@volar/language-core@npm:2.4.4, @volar/language-core@npm:~2.4.0-alpha.18, @volar/language-core@npm:~2.4.1":
version: 2.4.4
resolution: "@volar/language-core@npm:2.4.4"
dependencies:
"@volar/source-map": "npm:2.4.2"
checksum: 10c0/ee6f06c0b8597f6667f2d7fa0c102bf9ca7c4eeba6d6fb6033721456dc741cfbb67da2a9962526b742424e8923f3a93068c2c9bf28559318ffd06ed7df3d9573
"@volar/source-map": "npm:2.4.4"
checksum: 10c0/455c088c7e6cd0583633300f8f3a6a2d78ee35b7cb15401516f4fde8cab41cbc5b55b5855f9627e2840d7af6fc4a74d175039bdde96b8c27e8f949441bc06670
languageName: node
linkType: hard

"@volar/source-map@npm:2.4.2":
version: 2.4.2
resolution: "@volar/source-map@npm:2.4.2"
checksum: 10c0/94da26ad2f378495f7b2db273ba34d1bad33b2fb01423a93620de4ae1299ee0ad85b7bf7a925fea5ed80dd7f8cf3bbb88104af877ad0a310342aad46ea531689
"@volar/source-map@npm:2.4.4":
version: 2.4.4
resolution: "@volar/source-map@npm:2.4.4"
checksum: 10c0/c5875ecb1961108e6c24d26add81355057517f2a874f64f1abc65fd0d90fb3b6feebd5a8305a76e0089948a124b2ec7d889ade51bade3341baf3e3b7e118c8e6
languageName: node
linkType: hard

"@volar/typescript@npm:^2.3.4, @volar/typescript@npm:~2.4.0-alpha.18, @volar/typescript@npm:~2.4.1":
version: 2.4.2
resolution: "@volar/typescript@npm:2.4.2"
version: 2.4.4
resolution: "@volar/typescript@npm:2.4.4"
dependencies:
"@volar/language-core": "npm:2.4.2"
"@volar/language-core": "npm:2.4.4"
path-browserify: "npm:^1.0.1"
vscode-uri: "npm:^3.0.8"
checksum: 10c0/1038a414b8eedc535daa1461dab7782443f5265ab095b536ec33073a47bcbb52a1c4055900e3c2d43071ea4ed28bca1fa655e994980e2c8c33395017b1ef75f4
checksum: 10c0/07d404aa7024ff8b8231b5c21460b990344beb2179dd772931811f3107a2ddd1ff9ba02446cb30c6699a9ea0868cf76af4027e3168f1761ba8a0013def9ebf96
languageName: node
linkType: hard

Expand Down Expand Up @@ -7678,23 +7678,21 @@ __metadata:
languageName: node
linkType: hard

"concurrently@npm:^8.2.2":
version: 8.2.2
resolution: "concurrently@npm:8.2.2"
"concurrently@npm:^9.0.0":
version: 9.0.0
resolution: "concurrently@npm:9.0.0"
dependencies:
chalk: "npm:^4.1.2"
date-fns: "npm:^2.30.0"
lodash: "npm:^4.17.21"
rxjs: "npm:^7.8.1"
shell-quote: "npm:^1.8.1"
spawn-command: "npm:0.0.2"
supports-color: "npm:^8.1.1"
tree-kill: "npm:^1.2.2"
yargs: "npm:^17.7.2"
bin:
conc: dist/bin/concurrently.js
concurrently: dist/bin/concurrently.js
checksum: 10c0/0e9683196fe9c071d944345d21d8f34aa6c0cc50c0dd897e95619f2f1c9eb4871dca851b2569da17888235b7335b4c821ca19deed35bebcd9a131ee5d247f34c
checksum: 10c0/65251009f4540c25eda0d5b2f367ba8755eac83db2ce562802132160e9241c5cd755228b18c330ea29ccd5b0a033302da8a670d724e89fe462c26253e3046f2e
languageName: node
linkType: hard

Expand Down Expand Up @@ -8525,15 +8523,6 @@ __metadata:
languageName: node
linkType: hard

"date-fns@npm:^2.30.0":
version: 2.30.0
resolution: "date-fns@npm:2.30.0"
dependencies:
"@babel/runtime": "npm:^7.21.0"
checksum: 10c0/e4b521fbf22bc8c3db332bbfb7b094fd3e7627de0259a9d17c7551e2d2702608a7307a449206065916538e384f37b181565447ce2637ae09828427aed9cb5581
languageName: node
linkType: hard

"date-fns@npm:^3.6.0":
version: 3.6.0
resolution: "date-fns@npm:3.6.0"
Expand Down Expand Up @@ -16420,13 +16409,6 @@ __metadata:
languageName: node
linkType: hard

"spawn-command@npm:0.0.2":
version: 0.0.2
resolution: "spawn-command@npm:0.0.2"
checksum: 10c0/b22f2d71239e6e628a400831861ba747750bbb40c0a53323754cf7b84330b73d81e40ff1f9055e6d1971818679510208a9302e13d9ff3b32feb67e74d7a1b3ef
languageName: node
linkType: hard

"spdx-correct@npm:^3.0.0":
version: 3.2.0
resolution: "spdx-correct@npm:3.2.0"
Expand Down

0 comments on commit 5bcb140

Please sign in to comment.