This repository was archived by the owner on May 11, 2026. It is now read-only.
try macos-15-intel #12
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: Draft release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| env: | |
| NODE_ENV: production | |
| jobs: | |
| draft-release: | |
| name: "Draft release" | |
| runs-on: ubuntu-latest | |
| concurrency: draft-release | |
| outputs: | |
| release_id: ${{ steps.create-draft-release.outputs.id }} | |
| upload_url: ${{ steps.create-draft-release.outputs.upload_url }} | |
| version: ${{ steps.package-version.outputs.current-version }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Output version | |
| id: package-version | |
| uses: martinbeentjes/npm-get-version-action@main | |
| with: | |
| path: cli | |
| - name: Generate a changelog | |
| id: changelog | |
| uses: loopwerk/tag-changelog@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| config_file: .github/changelog.config.js | |
| - name: Create a draft release | |
| id: create-draft-release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| draft: true | |
| body: ${{ steps.changelog.outputs.changes }} | |
| build-cli: | |
| name: "Build CLI" | |
| needs: [draft-release] | |
| strategy: | |
| matrix: | |
| data: [ | |
| { | |
| os: "ubuntu-22.04-arm", | |
| filename: "snaplet-linux-arm64-${{ needs.draft-release.outputs.version }}", | |
| target: "node18-linux-arm64" | |
| }, | |
| { | |
| os: "ubuntu-22.04", | |
| filename: "snaplet-linux-x64-${{ needs.draft-release.outputs.version }}", | |
| npmFilename: "snaplet-npm-${{ needs.draft-release.outputs.version }}.tgz", | |
| target: "node18-linux-x64" | |
| }, | |
| { | |
| os: "windows-latest", | |
| filename: "snaplet-win-x64-${{ needs.draft-release.outputs.version }}.exe", | |
| target: "node18-win-x64" | |
| }, | |
| { | |
| os: "macos-15-intel", | |
| filename: "snaplet-macos-x64-${{ needs.draft-release.outputs.version }}", | |
| target: "node18-macos-x64" | |
| } | |
| ] | |
| runs-on: ${{ matrix.data.os }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: ./.github/actions/setup-node | |
| - run: yarn install | |
| - name: Build CLI | |
| run: yarn build:binary --force | |
| env: | |
| PKG_TARGET: ${{ matrix.data.target }} | |
| shell: bash | |
| - name: Prepare CLI npm package | |
| if: ${{ matrix.data.npmFilename }} | |
| working-directory: ./packages/cli | |
| run: | | |
| yarn install | |
| yarn prepareRelease ${{ matrix.data.npmFilename }} | |
| shell: bash | |
| - name: Upload CLI npm package | |
| uses: softprops/action-gh-release@v1 | |
| if: ${{ matrix.data.npmFilename }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| draft: true | |
| files: | |
| ./packages/cli/${{ matrix.data.npmFilename }} |