Skip to content

Merge pull request #170 from sasaplus1/feature/update-japanese-public… #21

Merge pull request #170 from sasaplus1/feature/update-japanese-public…

Merge pull request #170 from sasaplus1/feature/update-japanese-public… #21

Workflow file for this run

name: publish
on:
push:
branches:
- master
paths:
- 'package.json'
workflow_dispatch:
jobs:
publish:
name: publish to npm
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { version } = require('./package.json');
github.request('POST /repos/${{ github.repository }}/git/refs', {
ref: `refs/tags/${version}`,
sha: '${{ github.sha }}'
});