Skip to content

4.0.0-rc.26

4.0.0-rc.26 #28

Workflow file for this run

name: Publish to npm
on:
release:
types: [published]
permissions:
contents: write
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.event.release.prerelease || contains(github.event.release.tag_name, 'alpha') || contains(github.event.release.tag_name, 'beta') || contains(github.event.release.tag_name, 'rc') }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}
- uses: actions/setup-node@v4
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm install -g npm@latest
- name: Set package version
run: |
TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#v}"
npm version "$VERSION" --no-git-tag-version
- name: Publish to npm
run: npm publish --provenance --tag beta
- name: Trigger website deployment
run: |
curl -fsS -X POST \
-H "Authorization: Bearer ${{ secrets.GH_WEBSITE_TRIGGER_PAT }}" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/codeceptjs/website/dispatches \
-d '{"event_type":"codeceptjs-release"}'