Skip to content

chore: add MIT license and GitHub Actions release pipeline for v0.0.1… #1

chore: add MIT license and GitHub Actions release pipeline for v0.0.1…

chore: add MIT license and GitHub Actions release pipeline for v0.0.1… #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: bun-linux-x64
artifact: fenwei-proxy-linux-x64
- target: bun-windows-x64
artifact: fenwei-proxy-windows-x64.exe
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build executable
run: bun build --compile --target=${{ matrix.target }} src/index.ts --outfile dist/${{ matrix.artifact }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: dist/${{ matrix.artifact }}
if-no-files-found: error
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/fenwei-proxy-linux-x64/fenwei-proxy-linux-x64
dist/fenwei-proxy-windows-x64.exe/fenwei-proxy-windows-x64.exe
generate_release_notes: true