Create a release #258
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: Create a release | |
on: workflow_dispatch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
WORKING_DIRECTORY: ./ | |
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }} | |
concurrency: | |
group: npm-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "lts/*" | |
cache: 'yarn' | |
cache-dependency-path: 'package/yarn.lock' | |
- name: Install root node dependencies | |
run: yarn | |
- name: Install package dependencies | |
working-directory: package | |
run: yarn | |
- name: Download Skia Binary Artifacts | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: "build-skia.yml" | |
path: artifacts | |
branch: main | |
- name: Copy Artifacts to libs folder | |
run: yarn workflow-copy-libs | |
- name: Copy Skia Headers | |
run: yarn copy-skia-headers | |
- name: Build NPM Package | |
working-directory: package | |
run: | | |
yarn build | |
npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Install & Build Docs | |
run: cd package; yarn; cd ../docs; yarn; yarn build; | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/build | |
user_name: github-actions[bot] | |
user_email: 41898282+github-actions[bot]@users.noreply.github.com |