Update config.json #32
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 (Electron + Tauri) | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
permissions: write-all | |
jobs: | |
create_release: | |
name: Create a Release | |
outputs: | |
release_id: ${{ steps.create-release.outputs.result }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Get Release Data | |
id: create-release | |
uses: actions/github-script@v7 | |
with: | |
result-encoding: string | |
script: | | |
const version = await require("./index.js")(); | |
console.log(`Version: ${version}`); | |
return version; | |
env: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
publish_tauri: | |
name: Build the Tauri App | |
needs: create_release | |
strategy: | |
matrix: | |
os: [Windows-Latest, Ubuntu-Latest, Macos-Latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install Deps | |
run: pnpm install | |
working-directory: tauri | |
- name: install dependencies (ubuntu only) | |
if: matrix.os == 'Ubuntu-Latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: Build Tauri App | |
uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
releaseId: ${{ needs.create_release.outputs.release_id }} | |
- name: Release Zip Asset | |
run: node upload.cjs | |
if: matrix.os == 'Windows-Latest' | |
working-directory: tauri | |
env: | |
releaseid: ${{ needs.create_release.outputs.release_id }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
publish_electron: | |
name: Build the Electron App | |
needs: create_release | |
strategy: | |
matrix: | |
os: [Windows-Latest, Ubuntu-Latest, Macos-Latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Install Deps | |
run: pnpm install | |
working-directory: electron | |
- name: Build | |
run: pnpm build | |
working-directory: electron | |
- name: Get & Release Assets | |
run: node upload.cjs | |
working-directory: electron | |
env: | |
releaseid: ${{ needs.create_release.outputs.release_id }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
post_builders: | |
name: Release to GitHub Releases | |
needs: [create_release, publish_electron, publish_tauri] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
- name: Install npm deps | |
run: npm install | |
- name: Setup Rust | |
run: rustup toolchain install stable | |
- name: Install CLI | |
run: cargo install ahqstore_cli_rs | |
- name: Release App | |
uses: actions/github-script@v7 | |
env: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
release_id: ${{ needs.create_release.outputs.release_id }} | |
with: | |
script: | | |
await require("./index.js").release(); | |
- name: Build .ahqstore (Electron) | |
run: ahqstore upload | |
env: | |
APP_ID: U4StnJPm5ssnwpDZHZn4 | |
RELEASE_ID: ${{ needs.create_release.outputs.release_id }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
- name: Build .ahqstore (Tauri) | |
run: ahqstore upload | |
env: | |
APP_ID: jIvEpRUUzlqFWC2Wb404 | |
RELEASE_ID: ${{ needs.create_release.outputs.release_id }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ github.repository }} |