feat: download specificed chapters #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
publish_and_release: | |
permissions: | |
contents: write # Allows this job to create releases | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org | |
cache: 'pnpm' | |
- name: Install deps and build | |
run: | | |
pnpm install | |
pnpm build | |
- name: Publish to npmjs.com | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Get package version | |
run: echo "version=v$(node -p "require('./package.json').version")" >> $GITHUB_ENV | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
tag_name: ${{ env.version }} |