feat: update asset names for binaries and increment version to 1.1.3 #3
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: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Release tag (e.g., v1.0.0)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| build: | |
| name: Build binaries | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Windows builds | |
| - os: windows-latest | |
| target: win-x64 | |
| arch: x64 | |
| binary_name: claudedeploy.exe | |
| asset_name: claudedeploy-win-x64.exe | |
| # macOS builds (x64 and ARM64) | |
| - os: macos-latest | |
| target: macos-x64 | |
| arch: x64 | |
| binary_name: claudedeploy | |
| asset_name: claudedeploy-macos-x64 | |
| - os: macos-latest | |
| target: macos-arm64 | |
| arch: arm64 | |
| binary_name: claudedeploy | |
| asset_name: claudedeploy-macos-arm64 | |
| # Linux builds (x64 and ARM64) | |
| - os: ubuntu-latest | |
| target: linux-x64 | |
| arch: x64 | |
| binary_name: claudedeploy | |
| asset_name: claudedeploy-linux-x64 | |
| - os: ubuntu-latest | |
| target: linux-arm64 | |
| arch: arm64 | |
| binary_name: claudedeploy | |
| asset_name: claudedeploy-linux-arm64 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci --audit-level=moderate || true | |
| - name: Install pkg | |
| run: npm install -g pkg | |
| - name: Build binary | |
| run: | | |
| pkg . --targets node18-${{ matrix.target }} --output ${{ matrix.binary_name }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.asset_name }} | |
| path: ${{ matrix.binary_name }} | |
| retention-days: 1 | |
| release: | |
| name: Create Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./binaries | |
| - name: Display structure of downloaded files | |
| run: ls -R ./binaries | |
| - name: Make binaries executable (Unix) | |
| run: | | |
| chmod +x ./binaries/*/claudedeploy-linux-* | |
| chmod +x ./binaries/*/claudedeploy-macos-* | |
| chmod +x ./binaries/*/claudedeploy-win-* || true | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| ./binaries/*/claudedeploy-* | |
| ./binaries/*/claudedeploy.exe | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |