Skip to content

chore(release): v0.0.13 #19

chore(release): v0.0.13

chore(release): v0.0.13 #19

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
id-token: write
contents: write
pull-requests: write
env:
HUSKY: 0
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
skip: false
jobs:
release:
if: github.repository == 'yxw007/translate'
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
ref: master
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
version: 8
run_install: false
- name: Install Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
registry-url: https://registry.npmjs.org
- name: Install modules
run: pnpm install --no-frozen-lockfile
- name: Install tsx
run: pnpm install -g tsx
- name: Build
run: pnpm build
- name: Set npmrc
if: env.skip == 'false'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
echo "registry=https://registry.npmjs.org" >> ~/.npmrc
echo "always-auth=true" >> ~/.npmrc
- uses: actions/setup-node@v4
if: env.skip == 'false'
with:
node-version: '20.x'
# Note: Registration-url must be set here, otherwise the permissions will be wrong
registry-url: 'https://registry.npmjs.org'
- name: Publish package
if: env.skip == 'false'
run: pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}