Add release to R2 in actions #47
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: 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: ${{ R2_ENDPOINT }} | ||
Check failure on line 46 in .github/workflows/build.yml GitHub Actions / CI/CDInvalid workflow file
|
||
accesskeyid: ${{ R2_ID }} | ||
secretaccesskey: ${{ R2_KEY }} | ||
bucket: 'github-release' | ||
file: 'wuwa-tweaks.exe' | ||
destination: ${{ startsWith(github.ref, 'refs/tags/') && 'wuwa-tweaks.exe' || 'wuwa-tweaks-nightly.exe' }} | ||