Skip to content

Merge pull request #229 from locol23/chore/upgrage-node-version #147

Merge pull request #229 from locol23/chore/upgrage-node-version

Merge pull request #229 from locol23/chore/upgrage-node-version #147

Workflow file for this run

name: Publish
on:
push:
branches:
- main
tags:
- "!*"
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 5
- uses: pnpm/[email protected]
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- name: Publish
run: pnpx can-npm-publish && npm publish || echo "Does not publish"
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: package-version
run: node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
- name: package-version-to-git-tag
uses: pkgdeps/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }}
version: ${{ env.PACKAGE_VERSION }}
git_commit_sha: ${{ github.sha }}
git_tag_prefix: "v"