47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
jobs:
|
|
release:
|
|
name: Release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # Used by changests to create releases
|
|
id-token: write # The OIDC ID token is used for authentication with JSR.
|
|
pull-requests: write # Used by changesets to create a pull request for the release
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js 20.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20.x
|
|
|
|
- uses: denoland/setup-deno@v2
|
|
with:
|
|
cache: true
|
|
# TODO: Update to v2.x when https://github.com/jsr-io/jsr-npm/issues/129 is resolved
|
|
deno-version: v2.3.7
|
|
- name: Install Dependencies
|
|
run: yarn
|
|
|
|
- name: Build
|
|
run: yarn build
|
|
|
|
- name: Create Release Pull Request or Publish to npm
|
|
id: changesets
|
|
uses: changesets/action@v1
|
|
with:
|
|
publish: yarn run publish
|
|
version: yarn run version
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|