chore: release v1.0.24 #16
Workflow file for this run
This file contains hidden or 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 Package | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| publish: | |
| if: github.repository == 'guangzan/tona' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Set node version to 20 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org/ | |
| cache: pnpm | |
| - name: Install deps | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Build packages | |
| run: pnpm build:pkg | |
| - name: Build themes | |
| run: | | |
| pnpm --dir themes/geek build | |
| pnpm --dir themes/reacg build | |
| pnpm --dir themes/shadcn build | |
| - name: Package theme assets | |
| run: | | |
| zip -j geek.zip themes/geek/dist/* | |
| zip -j reacg.zip themes/reacg/dist/* | |
| zip -j shadcn.zip themes/shadcn/dist/* | |
| - name: Publish to npm | |
| run: npm i -g npm@^11.5.2 && pnpm run publish-ci ${{ github.ref_name }} | |
| - name: Generate Changelog | |
| run: npx changelogithub | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload theme assets | |
| run: gh release upload ${{ github.ref_name }} geek.zip reacg.zip shadcn.zip --clobber | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |