Release v1.1.0 (#56) #4
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: | |
- main | |
paths: | |
- deno.json | |
workflow_dispatch: | |
permissions: | |
contents: write | |
id-token: write | |
jobs: | |
Release: | |
runs-on: Ubuntu-Latest | |
steps: | |
- name: π Checkout Repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
- name: π Check the Version | |
id: version | |
run: | | |
version="$(jq -r '.version' deno.json)" | |
tag="$(git tag -l | sort -V | tail -n 1)" | |
if [[ "v$version" != "$tag" ]]; then | |
echo "next=v$version" >> "$GITHUB_OUTPUT" | |
fi | |
- name: π Rrelease a New Version | |
if: ${{ steps.version.outputs.next != '' }} | |
run: gh release create "${{ steps.version.outputs.next }}" --generate-notes | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: π¦ Publish to JSR | |
if: ${{ steps.version.outputs.next != '' }} | |
run: npx jsr publish |