fix: sync CLI version to 1.6.1, fix release CI, opt into Node.js 24 #2
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*"] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| target: bun-darwin-arm64 | |
| artifact: mails-darwin-arm64 | |
| - os: macos-latest | |
| target: bun-darwin-x64 | |
| artifact: mails-darwin-x64 | |
| - os: ubuntu-latest | |
| target: bun-linux-x64 | |
| artifact: mails-linux-x64 | |
| - os: ubuntu-24.04-arm | |
| target: bun-linux-arm64 | |
| artifact: mails-linux-arm64 | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install | |
| - run: bun build src/cli/index.ts --compile --target=${{ matrix.target }} --outfile ${{ matrix.artifact }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }} | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| files: artifacts/* | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| registry-url: https://registry.npmjs.org | |
| - run: npm install -g npm@latest | |
| - run: bun install | |
| - run: bun run build | |
| - run: bun run typecheck | |
| - name: Run CLI tests (isolated) | |
| run: bun test test/unit/cli.test.ts | |
| - name: Run remaining unit tests | |
| run: find test/unit -name '*.test.ts' ! -name 'cli.test.ts' | xargs bun test | |
| - name: Publish mails-agent | |
| run: npm publish --provenance --access public || true | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |