Skip to content

Update build.yml (i am dumb) #48

Update build.yml (i am dumb)

Update build.yml (i am dumb) #48

Workflow file for this run

name: CI/CD
permissions:
contents: write
discussions: write
on:
push:
tags:
- 'v*'
branches:
- main
jobs:
build-win:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Init Bun
uses: oven-sh/[email protected]
with:
bun-version: latest
no-cache: true
bun-download-url: "https://github.com/oven-sh/bun/releases/latest/download/bun-${{runner.os == 'macOS' && 'darwin' || runner.os}}-${{ runner.arch == 'X64' && 'x64' || 'arm64' }}.zip"
- name: Install Dependencies
run: bun install
- name: Build Windows
run: bun run build-win
- name: Build Mac
run: bun run build-mac
- name: Build Linux
run: bun run build-linux
- uses: actions/download-artifact@v4
with:
path: dist/
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/wuwa-tweaks.exe
dist/wuwa-tweaks-mac
dist/wuwa-tweaks-linux
tag_name: ${{startsWith(github.ref, 'refs/tags/') && github.ref || 'main'}}
- name: R2 Release
uses: randomairborne/[email protected]
with:
endpoint: ${{ secrets.R2_ENDPOINT }}
accesskeyid: ${{ secrets.R2_ID }}
secretaccesskey: ${{ secrets.R2_KEY }}
bucket: 'github-release'
file: 'wuwa-tweaks.exe'
destination: ${{ startsWith(github.ref, 'refs/tags/') && 'wuwa-tweaks.exe' || 'wuwa-tweaks-nightly.exe' }}