Skip to content

Commit 1a7bd92

Browse files
farhanclaude
andcommitted
refactor: drop semantic-release from npm workflow, publish on GitHub release
npm version tagging is now owned by pypi-release.yml (python-semantic-release). npm-release.yml triggers on release published events and does a plain npm publish, eliminating the conflict between two workflows creating release tags. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 95b6cc1 commit 1a7bd92

1 file changed

Lines changed: 14 additions & 23 deletions

File tree

.github/workflows/npm-release.yml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,32 @@
1-
name: Release CI
1+
name: npm Release
2+
23
on:
3-
push:
4-
branches:
5-
- master
4+
release:
5+
types: [published]
66

77
jobs:
8-
run_tests:
9-
uses: ./.github/workflows/ci.yml
10-
secrets: inherit
8+
publish:
9+
runs-on: ubuntu-latest
1110
permissions:
1211
contents: read
1312

14-
release:
15-
name: Release
16-
needs: run_tests
17-
runs-on: ubuntu-latest
18-
permissions:
19-
id-token: write # Required for OIDC
20-
contents: write # For Semantic Release tagging
2113
steps:
2214
- name: Checkout
23-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
24-
with:
25-
fetch-depth: 0
15+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2616

2717
- name: Setup Node.js
2818
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2919
with:
3020
node-version-file: '.nvmrc'
21+
registry-url: 'https://registry.npmjs.org'
22+
23+
- name: Set version from release tag
24+
run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version
3125

3226
- name: Install dependencies
3327
run: npm ci
3428

35-
- name: Create Build
36-
run: npm run build
37-
38-
- name: Release Package
39-
run: npx semantic-release@25
29+
- name: Publish to npm
30+
run: npm publish
4031
env:
41-
GITHUB_TOKEN: ${{ secrets.OPENEDX_SEMANTIC_RELEASE_GITHUB_TOKEN }}
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)