Skip to content

Commit 82f3a51

Browse files
Merge pull request #1034 from NordicSemiconductor/release_shared_in_GitHub_Action
Release shared in GitHub Actions
2 parents b4936b7 + f1b8338 commit 82f3a51

24 files changed

+1081
-447
lines changed

.github/workflows/create-source.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ jobs:
3838
- run: npm ci
3939
- env:
4040
ARTIFACTORY_TOKEN:
41-
${{ secrets.COM_NORDICSEMI_FILES_PASSWORD_SWTOOLS_FRONTEND }}
41+
${{ secrets.COM_NORDICSEMI_FILES_PASSWORD_SWTOOLS_FRONTEND
42+
}}
4243
run: |
43-
./node_modules/.bin/ts-node scripts/create-source.ts \
44+
./scripts/create-source.ts \
4445
--id '${{ inputs.id }}' \
4546
--access-level '${{ inputs.access-level }}' \
4647
--name '${{ inputs.name }}' \

.github/workflows/release-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Release app
22

33
on:
44
workflow_call:
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Release shared
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ref:
7+
description:
8+
Ref (Tag, branch, commit SHA) to release. Defaults to from
9+
where the workflow is triggered, usually the main branch.
10+
required: false
11+
type: string
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
env:
17+
GH_TOKEN: ${{ github.token }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
ref: ${{ inputs.ref }}
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
cache: 'npm'
26+
27+
- name: Check if release is possible
28+
run: |
29+
./scripts/is-releasable.ts
30+
31+
- run: npm ci
32+
- run: npm run check
33+
- run: npm test
34+
- run: npm pack
35+
36+
- name: Extract release notes
37+
run: ./scripts/latest-changelog-entry.ts > release_notes.md
38+
39+
- name: Determine next tag
40+
id: determine-next-tag
41+
uses: actions/github-script@v7
42+
with:
43+
script: |
44+
const version = require('./package.json').version;
45+
core.setOutput('tag', `v${version}`);
46+
47+
- name: Create GitHub release
48+
run: |
49+
gh release create "${{ steps.determine-next-tag.outputs.tag }}" \
50+
--title "${{ steps.determine-next-tag.outputs.tag }}" \
51+
--notes-file release_notes.md
52+
53+
- name: Publish to npm
54+
env:
55+
NODE_AUTH_TOKEN: ${{ secrets.WAYLAND_NPM_TOKEN }}
56+
run: |
57+
npm publish --provenance

Changelog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ This project does _not_ adhere to
77
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
88
every new version is a new major version.
99

10-
## 220.0.0 - UNRELEASED
10+
## 220.0.0 - 2025-07-16
1111

1212
### Added
1313

1414
- Option to persist the Group collapse state.
1515

16+
### Changed
17+
18+
- Use `tsx` instead of `ts-node`.
19+
- Switched releasing shared from Azure to GitHub Actions.
20+
1621
## 219.0.0 - 2025-07-10
1722

1823
### Fixed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,31 @@ apps and their launcher:
99
- Build scripts
1010
- Configurations
1111
- Test facilities
12+
13+
## Releasing
14+
15+
This project uses GitHub Actions for automated releases. To release a new
16+
version:
17+
18+
### Prepare the release
19+
20+
- Update the version in `package.json`.
21+
- Add a changelog entry in `Changelog.md` with the format:
22+
`## X.0.0 - YYYY-MM-DD`.
23+
- Commit and push your changes
24+
25+
### Create the release
26+
27+
- Go to the the
28+
[Release shared](https://github.com/NordicSemiconductor/pc-nrfconnect-shared/actions/workflows/release-shared.yml)
29+
action.
30+
- Click "Run workflow".
31+
- Optionally select a ref to release, but usually this should be `main` and
32+
can be left empty.
33+
34+
The workflow will:
35+
36+
- Check if a release is possible.
37+
- Build and test the package.
38+
- Create a GitHub release.
39+
- Publish to npm.

azure-pipelines.yml

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

config/tsconfig.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"ts-node": { "swc": true },
3-
42
"compilerOptions": {
53
"target": "es2021",
64
"moduleResolution": "node",

0 commit comments

Comments
 (0)