dep: update at 2024-12-20T03:02:25 #109
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 ebook to release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
- "stable" | |
paths: | |
- ".github/workflows/build-ebook.yaml" | |
- ".github/workflows/publish-release.yaml" | |
- ".releaserc" | |
- "src/**" | |
- "theme/**" | |
- "book.toml" | |
- "package.json" | |
- "pnpm-lock.yaml" | |
- "flake.nix" | |
- "flake.lock" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
id-token: write | |
jobs: | |
build: | |
uses: ./.github/workflows/build-ebook.yaml | |
publish: | |
permissions: | |
contents: write | |
needs: build | |
if: ${{ !(github.event_name == 'push' && contains(github.event.head_commit.message, '[skip release]')) }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate a token | |
id: generate-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ vars.TRIGGER_APP_ID }} | |
private-key: ${{ secrets.TRIGGER_APP_SECRET }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.generate-token.outputs.token }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
run_install: true | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: pnpm | |
node-version: current | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ebook | |
path: ebook | |
- name: Release ebook | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: pnpm exec semantic-release |