chore: bump version to 0.5.13 #60
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 | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| validate: | |
| name: Validate | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Typecheck | |
| run: bun run typecheck | |
| - name: Get version from tag | |
| id: version | |
| run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Validate version matches package.json | |
| run: | | |
| PKG_VERSION=$(jq -r .version package.json) | |
| TAG_VERSION=${{ steps.version.outputs.version }} | |
| if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then | |
| echo "Error: Tag version ($TAG_VERSION) doesn't match package.json version ($PKG_VERSION)" | |
| exit 1 | |
| fi | |
| publish-npm: | |
| name: Publish to npm | |
| runs-on: ubuntu-latest | |
| needs: validate | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Publish to npm | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| build-binaries: | |
| name: Build ${{ matrix.target }} | |
| runs-on: ubuntu-latest | |
| needs: validate | |
| strategy: | |
| matrix: | |
| include: | |
| - target: darwin-arm64 | |
| artifact: agentio-darwin-arm64 | |
| - target: linux-x64 | |
| artifact: agentio-linux-x64 | |
| - target: linux-arm64 | |
| artifact: agentio-linux-arm64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build binary | |
| run: bun build src/index.ts --compile --target=bun-${{ matrix.target }} --minify --sourcemap --bytecode --define BUILD_VERSION="\"${{ needs.validate.outputs.version }}\"" --outfile=${{ matrix.artifact }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }} | |
| # TODO: Re-enable .deb packages if needed | |
| # build-deb: | |
| # name: Build .deb packages | |
| # runs-on: ubuntu-latest | |
| # needs: [validate, build-binaries] | |
| # strategy: | |
| # matrix: | |
| # include: | |
| # - arch: amd64 | |
| # binary: agentio-linux-x64 | |
| # - arch: arm64 | |
| # binary: agentio-linux-arm64 | |
| # steps: | |
| # - name: Download binary | |
| # uses: actions/download-artifact@v4 | |
| # with: | |
| # name: ${{ matrix.binary }} | |
| # - name: Build .deb package | |
| # run: | | |
| # VERSION=${{ needs.validate.outputs.version }} | |
| # ARCH=${{ matrix.arch }} | |
| # PKG_NAME=agentio_${VERSION}_${ARCH} | |
| # mkdir -p ${PKG_NAME}/DEBIAN ${PKG_NAME}/usr/bin | |
| # cp ${{ matrix.binary }} ${PKG_NAME}/usr/bin/agentio | |
| # chmod 755 ${PKG_NAME}/usr/bin/agentio | |
| # dpkg-deb --build ${PKG_NAME} | |
| # - name: Upload artifact | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: agentio_${{ needs.validate.outputs.version }}_${{ matrix.arch }}.deb | |
| # path: agentio_${{ needs.validate.outputs.version }}_${{ matrix.arch }}.deb | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| needs: [validate, publish-npm, build-binaries] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Prepare release assets | |
| run: | | |
| mkdir -p release | |
| find artifacts -type f -exec mv {} release/ \; | |
| cd release | |
| sha256sum * > checksums.txt | |
| cat checksums.txt | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| release/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # TODO: Re-enable when homebrew-agentio repo is created | |
| # update-homebrew: | |
| # name: Update Homebrew Formula | |
| # runs-on: ubuntu-latest | |
| # needs: [validate, release] | |
| # steps: | |
| # - name: Download checksums | |
| # run: | | |
| # curl -sL "https://github.com/plosson/agentio/releases/download/v${{ needs.validate.outputs.version }}/checksums.txt" -o checksums.txt | |
| # - name: Checkout Homebrew tap | |
| # uses: actions/checkout@v4 | |
| # with: | |
| # repository: plosson/homebrew-agentio | |
| # token: ${{ secrets.REPOS_TOKEN }} | |
| # path: homebrew-tap | |
| # # ... update formula and push | |
| # TODO: Re-enable when scoop-agentio repo is created | |
| # update-scoop: | |
| # name: Update Scoop Manifest | |
| # runs-on: ubuntu-latest | |
| # needs: [validate, release] | |
| # steps: | |
| # - name: Download checksums | |
| # run: | | |
| # curl -sL "https://github.com/plosson/agentio/releases/download/v${{ needs.validate.outputs.version }}/checksums.txt" -o checksums.txt | |
| # - name: Checkout Scoop bucket | |
| # uses: actions/checkout@v4 | |
| # with: | |
| # repository: plosson/scoop-agentio | |
| # token: ${{ secrets.REPOS_TOKEN }} | |
| # path: scoop-bucket | |
| # # ... update manifest and push |