Create deploy.yml
This commit is contained in:
95
.github/workflows/deploy.yml
vendored
Normal file
95
.github/workflows/deploy.yml
vendored
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
name: Release FanslySync
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
app-slug:
|
||||||
|
type: string
|
||||||
|
description: Slug of the application
|
||||||
|
required: true
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
CN_APP_SLUG: ${{ github.event.inputs.app-slug }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
draft:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: create draft release
|
||||||
|
uses: crabnebula-dev/cloud-release@v0.1.0
|
||||||
|
with:
|
||||||
|
command: release draft ${{ env.CN_APP_SLUG }} --framework tauri
|
||||||
|
api-key: ${{ secrets.CN_API_KEY }}
|
||||||
|
|
||||||
|
build:
|
||||||
|
needs: draft
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
- name: Install stable toolchain
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: install Linux dependencies
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y webkit2gtk-4.0
|
||||||
|
|
||||||
|
- name: Install x86_64-apple-darwin for mac and build FanslySync binaries
|
||||||
|
if: matrix.os == 'macos-latest'
|
||||||
|
run: |
|
||||||
|
rustup target add x86_64-apple-darwin
|
||||||
|
npm ci
|
||||||
|
npm run tauri build -- --target x86_64-apple-darwin
|
||||||
|
npm run tauri build -- --target aarch64-apple-darwin
|
||||||
|
env:
|
||||||
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: build FanslySync app for Windows, Linux
|
||||||
|
if: matrix.os != 'macos-latest'
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run tauri build
|
||||||
|
env:
|
||||||
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: upload assets
|
||||||
|
uses: crabnebula-dev/cloud-release@v0.1.0
|
||||||
|
with:
|
||||||
|
command: release upload ${{ env.CN_APP_SLUG }} --framework tauri
|
||||||
|
api-key: ${{ secrets.CN_API_KEY }}
|
||||||
|
path: ./src-tauri
|
||||||
|
|
||||||
|
publish:
|
||||||
|
needs: build
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: publish release
|
||||||
|
uses: crabnebula-dev/cloud-release@v0.1.0
|
||||||
|
with:
|
||||||
|
command: release publish ${{ env.CN_APP_SLUG }} --framework tauri
|
||||||
|
api-key: ${{ secrets.CN_API_KEY }}
|
Reference in New Issue
Block a user