.github/workflows/release.yml #24
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
on: | |
workflow_dispatch: | |
inputs: | |
version-number: | |
description: 'Version number' | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install wasm | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Intall vsce | |
run: npm install -g @vscode/vsce | |
- run: wasm-pack build | |
working-directory: ./typst-math-rust | |
- name: Install npm dependencies | |
run: npm i | |
- name: Package extension | |
run: vsce package | |
- name: Upload VSIX artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact | |
path: typst-math-*.vsix | |
release: | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: success() | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Display structure of downloaded files | |
run: ls -R artifacts | |
- uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: "artifacts/*/*" | |
tag: ${{ github.event.inputs.version-number }} | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
omitDraftDuringUpdate: true | |
omitNameDuringUpdate: true | |
omitPrereleaseDuringUpdate: true | |
publish: | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: success() | |
steps: | |
- uses: actions/download-artifact@v4 | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Intall vsce | |
run: npm install -g @vscode/vsce | |
- name: Deploy to VS Code Marketplace | |
run: vsce publish --packagePath $(find . -type f -iname '*.vsix') | |
env: | |
VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} | |
- name: Deploy to OpenVSX | |
run: npx ovsx publish --packagePath $(find . -type f -iname '*.vsix') | |
env: | |
OVSX_PAT: ${{ secrets.OPENVSX_ACCESS_TOKEN }} |