Publish release archives #1
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 release archives | |
| on: | |
| workflow_run: | |
| workflows: | |
| - Create release tag | |
| types: | |
| - completed | |
| jobs: | |
| publish-release: | |
| if: github.event.workflow_run.conclusion == 'success' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 11.1.3 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Read release version | |
| id: version | |
| run: | | |
| version=$(tr -d '\n' < VERSION) | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| - name: Build release archives | |
| run: | | |
| pnpm run build:archives -- --version "${{ steps.version.outputs.version }}" --output release-assets | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: "v${{ steps.version.outputs.version }}" | |
| generate_release_notes: true | |
| overwrite_files: true | |
| files: release-assets/*.zip | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| fetch-depth: 0 | |
| path: main-repo | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 11.1.3 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: pnpm | |
| - name: Install dependencies in main checkout | |
| working-directory: main-repo | |
| run: pnpm install --frozen-lockfile | |
| - name: Rebuild CDN site from main | |
| working-directory: main-repo | |
| run: pnpm build | |
| - name: Deploy refreshed CDN metadata | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| workingDirectory: main-repo |