Skip to content

fix: release.yml

fix: release.yml #2

Workflow file for this run

name: Release
permissions:
contents: write
issues: write
pull-requests: write
on:
push:
branches:
- main
workflow_dispatch: # Allows manual triggering
jobs:
release:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Build artifacts
run: |
bun build --compile --minify --target=bun-linux-x64-modern src/cli.ts --outfile tile-packer-linux-x64
bun build --compile --minify --target=bun-darwin-arm64 src/cli.ts --outfile tile-packer-macos-arm64
bun build --compile --minify --target=bun-darwin-x64-modern src/cli.ts --outfile tile-packer-macos-x64
bun build --compile --minify --target=bun-windows-x64-modern src/cli.ts --outfile tile-packer-windows-x64.exe
- name: Upload release assets
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.RELEASE_TOKEN }}
release-type: node
package-name: tile-packer
draft: false
- name: Upload Release Artifact
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
gh release upload ${{ steps.release.outputs.tag_name }} tile-packer-linux-x64 tile-packer-macos-arm64 tile-packer-macos-x64 tile-packer-windows-x64.exe