Skip to content

Commit b7c01c8

Browse files
committed
chore: update build workflows - new node version and Trusted publishing
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
1 parent 3664113 commit b7c01c8

3 files changed

Lines changed: 16 additions & 9 deletions

File tree

.github/workflows/devworkspace-generator-publish-next.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,19 @@ on:
1515
- main
1616
- 7.**.x
1717

18+
permissions:
19+
id-token: write # Required for publishing to npmjs
20+
contents: write
21+
pull-requests: write
22+
23+
1824
jobs:
1925
publish:
2026
runs-on: ubuntu-22.04
2127
steps:
2228
- uses: actions/setup-node@v4
2329
with:
24-
node-version: '20'
30+
node-version: '24'
2531
registry-url: 'https://registry.npmjs.org'
2632
scope: '@eclipse-che'
2733
- name: Clone source code
@@ -36,8 +42,6 @@ jobs:
3642
key: yarn-${{ hashFiles('yarn.lock') }}
3743
restore-keys: yarn-
3844
- name: publish
39-
env:
40-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
4145
run: |
4246
if [[ ${GITHUB_REF##*/} == "7."**".x" ]]; then
4347
echo "[INFO] using ${GITHUB_REF##*/} tag"
@@ -47,7 +51,7 @@ jobs:
4751
DIST_TAG=next
4852
fi
4953
50-
yarn
54+
yarn install --frozen-lockfile
5155
yarn compile
5256
SHORT_SHA1=$(git rev-parse --short=7 HEAD)
5357
CURRENT_VERSION=$(jq -r '.version' package.json)

.github/workflows/devworkspace-generator-release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
name: Release Che Devworkspace Generator
1111

12+
permissions:
13+
id-token: write # Required for publishing to npmjs
14+
contents: write
15+
pull-requests: write
16+
1217
on:
1318
workflow_dispatch:
1419
inputs:
@@ -27,11 +32,11 @@ jobs:
2732
steps:
2833
- uses: actions/setup-node@v4
2934
with:
30-
node-version: '20'
35+
node-version: '24'
3136
registry-url: 'https://registry.npmjs.org'
3237
scope: '@eclipse-che'
3338
- name: "Checkout source code"
34-
uses: actions/checkout@v4
39+
uses: actions/checkout@v6
3540
with:
3641
fetch-depth: 0
3742
- name: Set up environment
@@ -68,11 +73,9 @@ jobs:
6873
restore-keys: yarn-
6974
- name: Run make-release.sh script
7075
env:
71-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
7276
GITHUB_TOKEN: ${{secrets.DEVWORKSPACE_GENERATOR_RELEASE_GITHUB_TOKEN}}
7377
run: |
7478
git config --global user.name "Anatolii Bazko"
7579
git config --global user.email "abazko@redhat.com"
7680
7781
./make-release.sh --version ${{ github.event.inputs.version }}
78-

make-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ checkoutToNextBranch() {
7272
publishArtifacts() {
7373
echo "[INFO] Publish DevWorkspace Generator ${VERSION} artifacts"
7474

75-
yarn
75+
yarn install --frozen-lockfile
7676
yarn compile
7777
npm publish --tag latest
7878
}

0 commit comments

Comments
 (0)