Skip to content

Build & Release

Build & Release #1

Workflow file for this run

name: Build & Release
on:
release:
types: [published]
jobs:
build:
runs-on: blacksmith-4vcpu-windows-2022
permissions:
contents: write
actions: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
run: pnpm install
- name: Build executable
run: pnpm run build
- name: Build installer
run: makensis installer.nsi
- name: Resolve installer path
id: installer
run: |
$file = Get-Item "dist\24Client Bridge_Setup_v*.exe" | Select-Object -First 1 -ExpandProperty FullName
echo "path=$file" >> $env:GITHUB_OUTPUT
- name: Upload artifact
id: artifact
uses: actions/upload-artifact@v4
with:
name: installer
path: ${{ steps.installer.outputs.path }}
retention-days: 1
- name: Attach installer to release
run: gh release upload ${{ github.event.release.tag_name }} "${{ steps.installer.outputs.path }}" --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete artifact
run: gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/${{ steps.artifact.outputs.artifact-id }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}