v10.9.1 #83
Workflow file for this run
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: Publish release | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: fregante/setup-git-user@v2 | |
- uses: pnpm/action-setup@v2 | |
# uses version from "packageManager" field in package.json | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: pnpm | |
node-version-file: '.node-version' | |
- name: Install Packages | |
run: | | |
pnpm install --frozen-lockfile | |
npm i json --global | |
env: | |
CYPRESS_CACHE_FOLDER: .cache/Cypress | |
- name: Prepare release | |
run: | | |
VERSION=${GITHUB_REF:10} | |
echo "Preparing release $VERSION" | |
git checkout -t origin/release/$VERSION | |
npm version --no-git-tag-version --allow-same-version $VERSION | |
git add package.json | |
git commit -nm "Bump version $VERSION" | |
git checkout -t origin/master | |
git merge -m "Release $VERSION" --no-ff release/$VERSION | |
git push --no-verify | |
- name: Publish | |
run: | | |
npm set //registry.npmjs.org/:_authToken $NPM_TOKEN | |
npm publish | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |