Skip to content

Release

Release #5

Workflow file for this run

name: Release
on: workflow_dispatch
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
packages: write # to be able to publish a GitHub package
id-token: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: ~1.x
- name: Restore deno cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.lock.json') }}
restore-keys: ${{ runner.os }}-deno-
path: |
~/.cache/deno/deps
~/Library/Caches/deno
~/AppData/Local/deno/deps
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
# File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions.
node-version-file: '.nvmrc' # optional
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
# Version of pnpm to install
version: latest # optional
# If specified, run `pnpm install`
run_install: true # optional, default is null
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Build
run: deno task build
- name: Release
run: pnpm semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Push changes
# if: ${{ github.ref == 'refs/heads/main' }}
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref }}