chore: release (#81) #66
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: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
deployments: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js 23 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '23.6' | |
cache: 'pnpm' | |
- run: pnpm install | |
- run: pnpm typecheck | |
- run: pnpm test | |
- name: Build templates | |
run: pnpm run build | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
version: '0.4.27' | |
- name: Gen APKG | |
run: pnpm run package | |
- name: Build playground | |
run: pnpm run pg-build | |
- name: Create Release Pull Request or Tag | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm changeset tag | |
title: 'chore: release' | |
commit: 'chore: release' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release | |
if: steps.changesets.outputs.published == 'true' | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: 'release/*.apkg' | |
artifactErrorsFailBuild: true | |
tag: ${{format('v{0}', fromJSON(steps.changesets.outputs.publishedPackages)[0].version)}} | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
- name: Publish playground | |
if: steps.changesets.outputs.published == 'true' | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: 'ikkz-template' | |
directory: 'playground/dist' | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |