Fixed issues with Nx 17 (#108) #80
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
name: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.SAML_ACCOUNT_TOKEN }} | |
- uses: ./.github/actions/prepare | |
- name: Build plugin | |
run: pnpm nx build nx-playwright | |
- name: Release | |
run: | | |
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 | |
pnpm publish --access=public | |
VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g') | |
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 |