Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

# Needed for lerna version to determine last tag
# Needed for release-it to determine last tag and version history
- name: Fetch
run: git fetch --prune --unshallow --tags

Expand All @@ -29,7 +32,12 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Update npm for trusted publishing
run: npm install -g npm@latest


- name: Install
run: yarn install --frozen-lockfile
Expand All @@ -45,12 +53,6 @@ jobs:
git config --global user.name amplitude-sdk-bot
git config --global user.email [email protected]

- name: Setup NPM Token
if: ${{ github.event.inputs.dryRun == 'false'}}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc

- name: Release (Dry Run)
if: ${{ github.event.inputs.dryRun == 'true'}}
env:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@
"tagName": "v${version}"
},
"npm": {
"publish": true
"publish": true,
"publishArgs": ["--provenance"]
},
"github": {
"release": true
Expand Down