chore: bump version to 1.18.0 #15
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: Release | |
| # Triggers on version tag pushes (e.g., v1.2.3) | |
| # | |
| # Prerequisites: | |
| # - NPM_TOKEN secret configured in repository settings (required for npm publishing) | |
| # - GITHUB_TOKEN is provided automatically by GitHub Actions | |
| # | |
| # What this workflow does: | |
| # 1. Builds 12 platform binaries (Linux/Darwin/Windows × arm64/x64 × baseline variants) | |
| # 2. Creates GitHub Release with auto-generated notes | |
| # 3. Uploads binary archives as release assets (.tar.gz for Linux, .zip for Darwin/Windows) | |
| # 4. Publishes to npm registry (tinycode-ai + platform-specific packages) | |
| # 5. Updates Docker, AUR, and Homebrew registries (non-preview releases only) | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write # Required for creating releases and uploading assets | |
| packages: write # Required for Docker image publishing | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release create ${{ github.ref_name }} --title "${{ github.ref_name }}" --generate-notes --draft | |
| - name: Build binaries and upload to release | |
| env: | |
| TINYCODE_VERSION: ${{ github.ref_name }} | |
| TINYCODE_RELEASE: "true" | |
| GH_REPO: ${{ github.repository }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: bun run packages/tinycode/script/build.ts | |
| - name: Publish release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release edit ${{ github.ref_name }} --draft=false | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to npm and registries | |
| env: | |
| TINYCODE_VERSION: ${{ github.ref_name }} | |
| TINYCODE_RELEASE: "true" | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Configure npm authentication | |
| echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
| # Run publish script (handles npm, Docker, AUR, Homebrew) | |
| bun run packages/tinycode/script/publish.ts |