Skip to content

task: add auto (#32) #23

task: add auto (#32)

task: add auto (#32) #23

Workflow file for this run

# test
name: version, tag and github release
on:
push:
branches: [main]
# support manual release in case something goes wrong and needs to be repeated or tested
workflow_dispatch:
inputs:
tag:
description: tag that needs to publish
type: string
required: true
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name || inputs.tag }}
token: ${{ secrets.DISPATCH_ACCESS_TOKEN }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
cache: yarn
- name: Upgrade npm for trusted publishing
run: npm install -g npm@^11.5.1
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.DISPATCH_ACCESS_TOKEN }}
NPM_TOKEN: '' # placeholder to prevent yarn from failing on ${NPM_TOKEN} expansion (OIDC token is written to ~/.npmrc by auto)
run: |
yarn install --frozen-lockfile
yarn build
yarn release