Skip to content

publish-validator

publish-validator #9

name: publish-validator
on:
workflow_dispatch:
permissions:
id-token: write # Needed for auth with Deno Deploy
contents: read # Needed to clone the repository
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x # Run with latest stable Deno.
- name: Build step
working-directory: core/validator/
run: "deno task build $(cat ./deno.json | jq -r '.version')"
- name: Release to npm
working-directory: core/validator/npm/
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release to JSR
working-directory: core/validator/
run: deno publish --allow-dirty