-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add use of NODE_AUTH_TOKEN when releasing (#119)
- Loading branch information
Showing
6 changed files
with
23 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
name: Prepare | ||
description: Installs dependencies | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ jobs: | |
build: | ||
name: Build and publish | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
|
@@ -18,16 +21,22 @@ jobs: | |
run: pnpm nx build nx-playwright | ||
|
||
- name: Release | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | ||
run: | | ||
set -x | ||
cd dist/packages/nx-playwright | ||
echo "scope=@mands" > .npmrc | ||
echo "@mands:registry=https://registry.npmjs.org/" >> .npmrc | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc | ||
{ | ||
echo "scope=@mands" | ||
echo "@mands:registry=https://registry.npmjs.org/" | ||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" | ||
} > .npmrc | ||
pnpm publish --access=public | ||
VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g') | ||
VERSION=$(node --print "require('./package.json').version") | ||
echo "Tagging version $VERSION" | ||
git config user.name release-bot | ||
git config user.email [email protected] | ||
git tag -a $VERSION -m "Version ${VERSION}" | ||
git push origin $VERSION | ||
git tag -a "${VERSION}" -m "Version ${VERSION}" | ||
git push origin "${VERSION}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters