Merge pull request #61 from rycont/refactor-docs-to-use-workspace #38
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 | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'deno.json' | |
jobs: | |
Publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v4 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Run tests | |
run: deno task test | |
- name: Get version from deno.json | |
id: get_version | |
run: echo "::set-output name=version::$(jq -r .version deno.json)" | |
- name: Create GitHub tag | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git tag -a v${{ steps.get_version.outputs.version }} -m "Release version ${{ steps.get_version.outputs.version }}" | |
git push origin v${{ steps.get_version.outputs.version }} | |
continue-on-error: true | |
- name: Publish to JSR | |
run: deno publish |