Skip to content

Commit beb76fb

Browse files
committed
chore: update release workflow
1 parent 1f9efaa commit beb76fb

File tree

6 files changed

+53
-42
lines changed

6 files changed

+53
-42
lines changed

.github/workflows/cd.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ jobs:
1616
environment: upload
1717

1818
permissions:
19-
id-token: write # Required by Akeyless
20-
contents: read
19+
id-token: write
20+
contents: write
21+
issues: write
2122
packages: read
23+
pull-requests: write
2224

2325
steps:
2426
- name: Import Secrets
@@ -28,23 +30,23 @@ jobs:
2830
access-id: ${{ secrets.GH_AKEYLESS_ACCESS_ID }}
2931
static-secrets: |
3032
{
31-
"/WebComponents/prod/tokens/GH_TOKEN": "GH_TOKEN",
32-
"/WebComponents/prod/tokens/PROGRESS_NPM_REGISTRY_TOKEN": "NPM_TOKEN"
33+
"${{ secrets.GH_AKEYLESS_GH_TOKEN_PATH }}": "GH_TOKEN",
34+
"${{ secrets.GH_AKEYLESS_NPM_TOKEN_PATH }}": "NPM_TOKEN"
3335
}
3436
export-secrets-to-environment: false
3537

3638
- name: Check out branch
37-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
3840
with:
3941
fetch-depth: 0 # Fetch all branches
4042

4143
- name: Set up Node.js
42-
uses: actions/setup-node@v2
44+
uses: actions/setup-node@v4
4345
with:
44-
node-version: '14'
46+
node-version: '20'
4547

4648
- name: Install modules
47-
run: npm install --no-audit
49+
run: npm ci --no-audit
4850

4951
- name: Build package
5052
run: npm run build-package
@@ -53,7 +55,7 @@ jobs:
5355
run: npm run test
5456

5557
- name: Publish release
56-
run: npx ci-semantic-release
58+
run: npx semantic-release
5759
env:
5860
NPM_TOKEN: ${{ steps.import-secrets.outputs.NPM_TOKEN }}
5961
GH_TOKEN: ${{ steps.import-secrets.outputs.GH_TOKEN }}

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818

1919
steps:
2020
- name: Check out repository
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v4
2222

2323
- name: Set up Node.js
24-
uses: actions/setup-node@v2
24+
uses: actions/setup-node@v4
2525
with:
26-
node-version: '14'
26+
node-version: '20'
2727

2828
- name: Install modules
29-
run: npm install --no-audit
29+
run: npm ci --no-audit
3030

3131
- name: Lint
3232
run: npm run lint

.github/workflows/publish.yml

+6-11
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,18 @@ jobs:
2121
uses: LanceMcCarthy/akeyless-action@v3
2222
with:
2323
access-id: ${{ secrets.GH_AKEYLESS_ACCESS_ID }}
24-
static-secrets: '{ "/WebComponents/prod/tokens/GH_TOKEN": "GH_TOKEN" }'
24+
static-secrets: '{ "${{ secrets.GH_AKEYLESS_GH_TOKEN_PATH }}": "GH_TOKEN" }'
2525
export-secrets-to-environment: false
2626

2727
- name: Check out master
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929
with:
3030
ref: master
3131
fetch-depth: 0 # Fetch all branches
3232
token: ${{ steps.import-secrets.outputs.GH_TOKEN }}
3333

34-
- name: Set up Node.js
35-
uses: actions/setup-node@v2
36-
with:
37-
node-version: '14'
38-
39-
- name: Install modules
40-
run: npm install @progress/semantic-prerelease --no-save
41-
4234
- name: Fast-forward master to develop
43-
run: npx release-master
35+
run: |
36+
# TODO: Remove after first sync with master
37+
git checkout origin/develop -- ./tools/release-master
38+
./tools/release-master

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
2-
[![Build Status](https://travis-ci.org/telerik/kendo-intl.svg?branch=master)](https://travis-ci.org/telerik/kendo-intl)
31
[![npm version](https://badge.fury.io/js/%40progress%2Fkendo-intl.svg)](https://badge.fury.io/js/%40telerik%2Fkendo-intl)
42

53

package.json

+13-16
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@
1515
"test:watch": "jest --watch -- ./test",
1616
"locale-tests": "jest -- ./locale-tests",
1717
"locale-tests:watch": "jest --watch -- ./locale-tests",
18-
"lint": "eslint --quiet -- ./src ./test ./locale-tests/*.js",
19-
"semantic-release": "semantic-release pre && semantic-prerelease publish && semantic-release post"
18+
"lint": "eslint --quiet -- ./src ./test ./locale-tests/*.js"
2019
},
2120
"keywords": [
2221
"Kendo",
2322
"Internationalization"
2423
],
2524
"devDependencies": {
2625
"@progress/kendo-package-tasks": "dev",
27-
"@progress/semantic-prerelease": "^3.0.0",
2826
"@typescript-eslint/eslint-plugin": "^5.27.0",
2927
"@typescript-eslint/parser": "^5.27.0",
3028
"cldr-core": "^41.0.0",
@@ -42,7 +40,7 @@
4240
"ghooks": "^1.0.3",
4341
"gulp": "^4.0.0",
4442
"jest-cli": "^26.6.3",
45-
"semantic-release": "^6.3.6",
43+
"semantic-release": "^24.2.1",
4644
"validate-commit-msg": "^1.1.1"
4745
},
4846
"config": {
@@ -59,18 +57,17 @@
5957
"url": "https://github.com/telerik/kendo-intl.git"
6058
},
6159
"release": {
62-
"debug": false,
63-
"branchTags": {
64-
"develop": "dev"
65-
},
66-
"fallbackTags": {
67-
"dev": "latest"
68-
},
69-
"analyzeCommits": "@progress/semantic-prerelease/analyzeCommits",
70-
"generateNotes": "@progress/semantic-prerelease/generateNotes",
71-
"getLastRelease": "@progress/semantic-prerelease/getLastRelease",
72-
"verifyConditions": "@progress/semantic-prerelease/verifyConditions",
73-
"verifyRelease": "@progress/semantic-prerelease/verifyRelease"
60+
"branches": [{
61+
"name": "master",
62+
"channel": "latest"
63+
}, {
64+
"name": "develop",
65+
"prerelease": true,
66+
"channel": "dev"
67+
}]
68+
},
69+
"publishConfig": {
70+
"provenance": true
7471
},
7572
"files": [
7673
"dist",

tools/release-master

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
set -o verbose
4+
BRANCH=$(git rev-parse --abbrev-ref HEAD)
5+
6+
if [ $BRANCH != "master" ]; then
7+
echo "Refusing to release from $BRANCH. This script should be running in master."
8+
exit 1
9+
fi
10+
11+
echo Fast-forwarding master to develop
12+
set -o errexit
13+
git fetch --quiet
14+
git reset --hard origin/master
15+
git merge --ff-only --quiet origin/develop
16+
set +o errexit
17+
18+
echo Pushing master
19+
git push origin master

0 commit comments

Comments
 (0)