add process and relaunch #22
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: Publish Release | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
app-slug: | |
description: "The slug of your app in your CrabNebula Cloud org" | |
required: true | |
default: "pulsar" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CN_APP_SLUG: ${{ github.event.inputs.app-slug || 'pulsar' }} | |
jobs: | |
draft: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: create draft release | |
uses: crabnebula-dev/[email protected] | |
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 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install stable toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
cache: false | |
- name: install Linux dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.0-dev webkit2gtk-4.1 | |
- name: build tauri app | |
run: | | |
pnpm install | |
pnpm run tauri build | |
env: | |
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
- name: upload assets | |
uses: crabnebula-dev/[email protected] | |
with: | |
command: release upload ${{ env.CN_APP_SLUG }} --framework tauri | |
api-key: ${{ secrets.CN_API_KEY }} | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: publish release | |
uses: crabnebula-dev/[email protected] | |
with: | |
command: release publish ${{ env.CN_APP_SLUG }} --framework tauri | |
api-key: ${{ secrets.CN_API_KEY }} |