Skip to content

Publish

Publish #10

Workflow file for this run

name: Publish
on:
workflow_dispatch:
jobs:
PublishPackage:
name: Publish typedoc-json-parser
runs-on: ubuntu-latest
if: github.repository_owner == 'RealShadowNova'
steps:
- name: Checkout Project
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
ref: main
token: ${{ secrets.NOVA_TOKEN }}
- name: Use Node.js v20
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: 20
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
- name: Configure Git
run: |
git remote set-url origin "https://${GITHUB_TOKEN}:[email protected]/${GITHUB_REPOSITORY}.git"
git config --local user.email "${GITHUB_EMAIL}"
git config --local user.name "${GITHUB_USER}"
env:
GITHUB_USER: github-actions[bot]
GITHUB_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Bump Version & Make Release
run: yarn bump
env:
GITHUB_TOKEN: ${{ secrets.NOVA_TOKEN }}
- name: Publish to NPM
run: |
yarn config set npmAuthToken ${NODE_AUTH_TOKEN}
yarn config set npmPublishRegistry "https://registry.yarnpkg.com"
yarn npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}