rebebuca #60
Workflow file for this run
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: 'rebebuca' | |
on: | |
create: | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Download rebebuca repo | |
run: | | |
git clone --depth 1 https://github.com/rebebuca/rebebuca.git | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: repo | |
path: rebebuca | |
build-tauri-windows: | |
needs: build | |
runs-on: windows-latest | |
steps: | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: install Rust stable windows | |
uses: actions-rs/toolchain@v1 | |
with: | |
default: true | |
override: true | |
profile: minimal | |
toolchain: stable | |
target: x86_64-pc-windows-msvc | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: repo | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: false | |
- name: download-ffmpeg | |
run: | | |
pnpm i | |
cd src-tauri | |
mkdir -p bin -ErrorAction Ignore | |
cd bin | |
Invoke-WebRequest -Uri https://download.m7s.live/bin/ffmpeg-x86_64-pc-windows-msvc.exe -OutFile .\ffmpeg-x86_64-pc-windows-msvc.exe | |
- uses: JonasKruckenberg/tauri-build@v1 | |
id: tauri_build | |
env: | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
with: | |
target: x86_64-pc-windows-msvc | |
projectPath: src-tauri | |
debug: false | |
- name: copy ouputs | |
run: | | |
mkdir -p rb_build | |
$files = "${{ join(fromJSON(steps.tauri_build.outputs.artifacts),'","') }}" | |
Copy-Item -Path $files -Destination rb_build | |
- name: R2 Release | |
uses: shallwefootball/upload-s3-action@v1.3.3 | |
with: | |
aws_key_id: ${{ secrets.R2_KEY }} | |
aws_secret_access_key: ${{ secrets.R2_SECRET }} | |
aws_bucket: monibuca | |
source_dir: rb_build | |
destination_dir: rb | |
endpoint: https://${{ secrets.R2_DOMAIN }} | |
build-tauri-mac: | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
rust_target: | |
- x86_64-apple-darwin | |
- aarch64-apple-darwin | |
runs-on: macos-latest | |
steps: | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: install Rust stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
default: true | |
override: true | |
profile: minimal | |
toolchain: stable | |
target: ${{ matrix.rust_target }} | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: repo | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: false | |
- name: download-ffmpeg | |
run: | | |
pnpm i | |
cd src-tauri | |
ls -a | |
rm -rf target | |
mkdir -p bin | |
cd bin | |
curl -O https://download.m7s.live/bin/ffmpeg-aarch64-apple-darwin | |
curl -O https://download.m7s.live/bin/ffmpeg-x86_64-apple-darwin | |
chmod 777 ffmpeg-aarch64-apple-darwin | |
chmod 777 ffmpeg-x86_64-apple-darwin | |
- uses: JonasKruckenberg/tauri-build@v1 | |
id: tauri_build | |
env: | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
with: | |
target: ${{ matrix.rust_target }} | |
projectPath: src-tauri | |
debug: false | |
- name: copy ouputs | |
run: | | |
mkdir -p rb_build | |
cp ${{ join(fromJSON(steps.tauri_build.outputs.artifacts),' ') }} rb_build/ | |
- name: R2 Release | |
uses: shallwefootball/upload-s3-action@v1.3.3 | |
with: | |
aws_key_id: ${{ secrets.R2_KEY }} | |
aws_secret_access_key: ${{ secrets.R2_SECRET }} | |
aws_bucket: monibuca | |
source_dir: rb_build | |
destination_dir: rb | |
endpoint: https://${{ secrets.R2_DOMAIN }} | |