Try fix action #11
Workflow file for this run
This file contains 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 Envy CLI | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: | |
- linux-x64 | |
- linux-arm64 | |
- windows-x64 | |
- darwin-x64 | |
- darwin-arm64 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install | |
- name: Build CLI | |
run: | | |
bun build --compile --minify --sourcemap ./src/bin.ts --target bun-${{ matrix.platform }} --outfile ./dist/${{ matrix.platform }} | |
# Upload the built CLI as an artifact for the release job to use later | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cli-builds | |
path: ./dist/${{ matrix.platform }} | |
release: | |
runs-on: ubuntu-latest | |
needs: build # Wait for all builds to finish | |
steps: | |
# Checkout the repository to ensure git is available | |
- uses: actions/checkout@v3 | |
- name: Download all build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: cli-builds | |
- name: Print builds | |
run: ls ./dist -R | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
tag="${GITHUB_REF#refs/tags/}" | |
# Create a single release for all platforms | |
gh release create "$tag" \ | |
--title="$tag" \ | |
--draft \ | |
./dist/** | |
... |