1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 03:56:59 +00:00
classcharts-api-js/.github/workflows/release.yml
2026-05-08 18:33:08 +01:00

45 lines
1.1 KiB
YAML

name: Release
on:
push:
tags:
- "*"
permissions:
id-token: write
contents: read
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
environment: Publish
steps:
- name: Checkout Repo
uses: actions/checkout@v5
- uses: denoland/setup-deno@v2
with:
deno-version: "latest"
- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT
- uses: actions/setup-node@v6
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
package-manager-cache: false # never use caching in release builds
- uses: pnpm/action-setup@v6
with:
version: 11
- name: npm build
run: deno task npm ${{steps.get_tag_version.outputs.TAG_VERSION}}
- name: npm publish
if: startsWith(github.ref, 'refs/tags/')
run: cd npm && npm publish --provenance --access public