-
Notifications
You must be signed in to change notification settings - Fork 32
57 lines (48 loc) · 1.92 KB
/
release.yaml
File metadata and controls
57 lines (48 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This Manually Executable Workflow is for NPM Releases
name: Release [Manual]
on: workflow_dispatch
permissions:
contents: write
id-token: write # REQUIRED for trusted publishing
jobs:
Release:
runs-on: ubuntu-latest
# Specify environment if you configured one in npm
# environment: production # Uncomment if you set an environment name in npm trusted publisher settings
steps:
- uses: actions/checkout@v3
with:
# fetch-depth is necessary to get all tags
# otherwise lerna can't detect the changes and will end up bumping the versions for all packages
fetch-depth: 0
token: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
- name: Setup Node
uses: actions/setup-node@v4 # UPDATED to v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
always-auth: false # for trusted publishing
- name: Configure CI Git User
run: |
git config --global user.name $CONFIG_USERNAME
git config --global user.email $CONFIG_EMAIL
git remote set-url origin https://$GITHUB_ACTOR:$GITHUB_PAT@github.com/sourcefuse/loopback4-authentication
env:
GITHUB_PAT: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
CONFIG_USERNAME: ${{ vars.RELEASE_COMMIT_USERNAME }}
CONFIG_EMAIL: ${{ vars.RELEASE_COMMIT_EMAIL }}
- name: Install 📌
run: npm install
- name: Test 🔧
run: npm run test
# CHANGED THIS SECTION
- name: Semantic Publish to NPM 🚀
run: |
npm config set provenance true
HUSKY=0 npx semantic-release
env:
GH_TOKEN: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
# NPM_TOKEN is not needed with trusted publishing
# The id-token: write permission above handles authentication
- name: Changelog 📝
run: cd src/release_notes && HUSKY=0 node release-notes.js