build: Update the release workflow to use OIDC. (#575)
Also make other smaller updates to modernize the release file.
This commit is contained in:
committed by
GitHub
parent
9905fff1a0
commit
1abf704144
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
@@ -4,6 +4,11 @@ on:
|
||||
branches:
|
||||
- master
|
||||
- alpha
|
||||
|
||||
permissions:
|
||||
id-token: write # Required for OIDC
|
||||
contents: write # For Semantic Release tagging
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
@@ -13,12 +18,10 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Nodejs Env
|
||||
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VER }}
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Validate package-lock.json changes
|
||||
@@ -37,7 +40,6 @@ jobs:
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Release
|
||||
run: npx semantic-release@25
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}
|
||||
run: npx semantic-release
|
||||
GITHUB_TOKEN: ${{ secrets.OPENEDX_SEMANTIC_RELEASE_GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user