Skip to content

Publish

Publish #68

Workflow file for this run

name: Publish
on:
workflow_dispatch:
jobs:
check-all:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "20.4.0"
registry-url: "https://registry.npmjs.org"
- name: Enable Corepack
run: corepack enable
- name: Set Yarn version
run: corepack prepare yarn@3.6.3 --activate
- name: Cache Yarn dependencies
uses: actions/cache@v4
with:
path: |
~/.yarn
.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: deadCode:check
run: yarn deadCode:check
- name: lint:check
run: yarn lint:check
- name: types:check
run: yarn types:check
- name: format:check
run: yarn format:check
- name: test:check
run: yarn test:check
publish:
needs: check-all
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "20.4.0"
registry-url: "https://registry.npmjs.org"
- name: Enable Corepack
run: corepack enable
- name: Set Yarn version
run: corepack prepare yarn@3.6.3 --activate
- name: Cache Yarn dependencies
uses: actions/cache@v4
with:
path: |
~/.yarn
.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}