Don't suspend on preview payload changes because it becomes very visi… #1835
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: ci | |
on: | |
push: | |
branches: [main] | |
tags: [v*] | |
pull_request: | |
branches: [main] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: {node-version: '20', cache: 'yarn'} | |
- run: yarn | |
- name: Check cycles for server target | |
run: yarn cycles:server | |
- name: Check cycles for browser target | |
run: yarn cycles:browser | |
- run: yarn test --report | |
- run: yarn build && npx pkg-pr-new publish --comment=off | |
- uses: nowsprinting/check-version-format-action@v3 | |
id: version | |
with: {prefix: 'v'} | |
- if: steps.version.outputs.is_valid == 'true' | |
run: | | |
rm -r dist && rm tsconfig.tsbuildinfo | |
yarn bump ${GITHUB_REF#refs/tags/v} | |
npm config set //registry.npmjs.org/:_authToken ${{secrets.NPM_AUTH_TOKEN}} | |
- if: steps.version.outputs.is_valid == 'true' && !steps.version.outputs.prerelease | |
run: npm publish | |
- if: steps.version.outputs.prerelease | |
run: npm publish --tag preview | |
- if: steps.version.outputs.is_valid == 'true' && !steps.version.outputs.prerelease | |
id: extract-release-notes | |
uses: ffurrer2/extract-release-notes@v1 | |
with: | |
changelog_file: changelog.md | |
- if: steps.version.outputs.is_valid == 'true' && !steps.version.outputs.prerelease | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false | |
prerelease: false | |
body: ${{ steps.extract-release-notes.outputs.release_notes }} |