v2.0.0-rc3 #23
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 package to NPM | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: extractions/setup-just@v1 | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
- name: Setup Deno | |
uses: denoland/[email protected] | |
- name: Build | |
run: npm run build | |
- name: remove dist/ package for now | |
run: rm dist/*.tgz | |
- name: Update package version | |
run: | | |
tag="${{ github.ref }}" | |
tag="${tag/refs\/tags\/v/}" | |
npm version $tag --no-git-tag-version --no-commit-hooks | |
jsr="$(<jsr.json jq '. |.version = $version' --arg version "$tag")" | |
echo "$jsr" >jsr.json | |
- name: npm publish @extism/extism | |
uses: JS-DevTools/[email protected] | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
- name: jsr publish @extism/extism | |
run: | | |
npx jsr publish --allow-dirty | |
- name: Update package name | |
run: | | |
pkg="$(<package.json jq '.name = "extism"')" | |
echo "$pkg" >package.json | |
- name: npm publish extism | |
uses: JS-DevTools/[email protected] | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
- name: typedoc | |
run: just docs | |
- name: Deploy docs to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs |