Merge pull request #3159 from finetjul/imagereslicemapper-snap-sensit… #897
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: | |
- master | |
- next | |
- next-major | |
- beta | |
- '[0-9]+.x' | |
- '[0-9]+.[0-9]+.x' | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: | | |
npm ci | |
sudo apt-get install xvfb | |
- name: Build | |
run: npm run build:release | |
- name: Validate code style | |
run: npm run validate | |
- name: Validate generated typescript definitions | |
run: | | |
npx tsc -p tsconfig.esm-check.json | |
npx tsc -p tsconfig.umd-check.json | |
- name: Chrome and Firefox tests | |
run: xvfb-run --auto-servernum npm run test -- --browsers Chrome,Firefox | |
- name: Archive test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: Utilities/TestResults/Test-Report.html | |
retention-days: 15 | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
git config --global user.name "Github Actions" | |
git config --global user.email "[email protected]" | |
npm run semantic-release | |
- name: Build API docs | |
if: github.ref == 'refs/heads/master' | |
run: npm run doc:generate-api | |
- name: Publish docs | |
if: github.ref == 'refs/heads/master' | |
env: | |
GIT_PUBLISH_URL: https://${{ secrets.GH_PUBLISH_CREDS }}@github.com/Kitware/vtk-js.git | |
run: npm run doc:publish |