Skip to content

Commit 08b54cd

Browse files
arbrandesclaude
andcommitted
build: add semantic-release for automated npm publishing
Adds `.releaserc` and a release GitHub Actions workflow, releasing from the `frontend-base` branch as a prerelease (`alpha`) to the `latest` dist-tag. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 03f3d7d commit 08b54cd

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release CI
2+
on:
3+
push:
4+
branches:
5+
- frontend-base
6+
7+
permissions:
8+
id-token: write # Required for OIDC
9+
contents: write # For Semantic Release tagging
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-24.04
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v6
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v6
23+
with:
24+
node-version-file: '.nvmrc'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Release to npm/Github
30+
run: npx semantic-release@25
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.OPENEDX_SEMANTIC_RELEASE_GITHUB_TOKEN }}

.releaserc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"branches": [
3+
"placeholder",
4+
{ "name": "frontend-base", "prerelease": "alpha", "channel": "latest" }
5+
],
6+
"tagFormat": "v${version}",
7+
"plugins": [
8+
"@semantic-release/commit-analyzer",
9+
"@semantic-release/release-notes-generator",
10+
"@semantic-release/npm",
11+
"@semantic-release/github"
12+
]
13+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"repository": {
66
"type": "git",
7-
"url": "git+https://github.com/edx/frontend-app-learner-dashboard.git"
7+
"url": "git+https://github.com/openedx/frontend-app-learner-dashboard.git"
88
},
99
"exports": {
1010
".": "./dist/index.js",

0 commit comments

Comments
 (0)