1+ name : Release ducpdf
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches : [main, next, dev]
7+ paths :
8+ - ' packages/ducpdf/**'
9+ - ' package.json'
10+
11+ permissions :
12+ contents : write
13+ issues : write
14+ pull-requests : write
15+
16+ jobs :
17+ release_ducpdf :
18+ runs-on : ubuntu-latest
19+ concurrency :
20+ group : release-ducpdf
21+ cancel-in-progress : false
22+ steps :
23+ - uses : actions/checkout@v4
24+ with :
25+ fetch-depth : 0
26+ ref : ${{ github.ref_name }}
27+ persist-credentials : true
28+ - name : Set Git User
29+ run : |
30+ git config user.name "GitHub Action"
31+ git config user.email "action@github.com"
32+ - name : Setup Bun
33+ uses : oven-sh/setup-bun@v2
34+ with :
35+ bun-version : " latest"
36+ - name : Install deps
37+ run : bun install
38+ - name : Build
39+ run : bun ducpdf:build
40+
41+ - name : Prepare workspace dependencies for publish
42+ run : node scripts/fix-workspace-deps.mjs packages/ducpdf/package.json
43+
44+ - name : Configure npm auth for publish
45+ run : echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
46+ env :
47+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
48+
49+ - name : Setup release environment
50+ id : setup-release-environment
51+ uses : ./.github/actions/simulate-main-environment
52+ with :
53+ current-branch : ${{ github.ref_name }}
54+ package-name : ducpdf
55+
56+ - name : Release ducpdf package
57+ env :
58+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59+ NPM_CONFIG_TOKEN : ${{ secrets.NPM_TOKEN }}
60+ # DEBUG: "semantic-release:*" # For verbose logging
61+ working-directory : ./packages/ducpdf
62+ run : npx semantic-release ${{ steps.setup-release-environment.outputs.release-mode }}
63+
64+ - name : Release duc2pdf crate
65+ env :
66+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
67+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
68+ working-directory : ./packages/ducpdf/src/duc2pdf
69+ run : npx semantic-release
0 commit comments