Skip to content

Publish to package

Publish to package #40

Workflow file for this run

name: Publish to package
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: 8.6.11
- uses: actions/setup-node@v2
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
cache: pnpm
- name: install deps
run: pnpm install
# No need to build. Build is executed before publish automatically
- name: publish to NPM
run: pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: archive files
run: tar -czvf deStagnate.tar.gz dist && zip -rv deStagnate.zip dist
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./deStagnate.tar.gz
./deStagnate.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docs:
name: generate docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: 8.6.11
- uses: actions/setup-node@v2
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
cache: pnpm
- name: install deps
run: pnpm install
- name: build docs
run: pnpm build --docs
- name: deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/public