mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
refactor: update CI workflow to use conditional environment settings
- Modified the package-and-publish.yml file to implement conditional environment settings for the Production environment based on the branch. - Standardized quote usage throughout the workflow configuration for improved consistency and readability. - Adjusted the args section for macOS and Ubuntu platforms to align with the new quoting style.
This commit is contained in:
@@ -10,7 +10,7 @@ name: Package and publish
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ['Version Bump']
|
||||
workflows: ["Version Bump"]
|
||||
types:
|
||||
- completed
|
||||
branches:
|
||||
@@ -112,7 +112,7 @@ jobs:
|
||||
create-release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [get-version, check-version]
|
||||
environment: Production
|
||||
environment: ${{ github.ref == 'refs/heads/main' && 'Production' || '' }}
|
||||
if: needs.get-version.outputs.should-publish != '' && needs.check-version.outputs.should-skip != 'true'
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -155,7 +155,7 @@ jobs:
|
||||
name: Build, package and publish Tauri
|
||||
needs: [get-version, check-version, create-release]
|
||||
if: ${{ !failure() && !cancelled() && needs.check-version.outputs.should-skip != 'true' }}
|
||||
environment: Production
|
||||
environment: ${{ github.ref == 'refs/heads/main' && 'Production' || '' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.XGH_TOKEN }}
|
||||
permissions:
|
||||
@@ -164,12 +164,12 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
settings:
|
||||
- platform: 'macos-latest'
|
||||
args: '--target aarch64-apple-darwin'
|
||||
- platform: 'macos-latest'
|
||||
args: '--target x86_64-apple-darwin'
|
||||
- platform: 'ubuntu-22.04'
|
||||
args: ''
|
||||
- platform: "macos-latest"
|
||||
args: "--target aarch64-apple-darwin"
|
||||
- platform: "macos-latest"
|
||||
args: "--target x86_64-apple-darwin"
|
||||
- platform: "ubuntu-22.04"
|
||||
args: ""
|
||||
runs-on: ${{ matrix.settings.platform }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -188,7 +188,7 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24.x
|
||||
cache: 'yarn'
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
@@ -307,7 +307,7 @@ jobs:
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.UPDATER_PRIVATE_KEY_PASSWORD }}
|
||||
WITH_UPDATER: ${{ needs.get-version.outputs.should-publish != '' && 'true' || 'false' }}
|
||||
with:
|
||||
args: '-c ${{ steps.config-overrides.outputs.json }} ${{ matrix.settings.args }}'
|
||||
args: "-c ${{ steps.config-overrides.outputs.json }} ${{ matrix.settings.args }}"
|
||||
includeDebug: ${{ needs.get-version.outputs.should-publish == '' && inputs.forceRelease != 'true' }}
|
||||
includeRelease: ${{ needs.get-version.outputs.should-publish != '' || inputs.forceRelease == 'true' }}
|
||||
releaseId: ${{ needs.create-release.outputs.releaseId }}
|
||||
@@ -392,7 +392,7 @@ jobs:
|
||||
# name: Build and package Android APK
|
||||
# needs: [get-version, check-version, create-release]
|
||||
# if: ${{ !failure() && !cancelled() && needs.check-version.outputs.should-skip != 'true' }}
|
||||
# environment: Production
|
||||
# environment: ${{ github.ref == 'refs/heads/main' && 'Production' || '' }}
|
||||
# runs-on: ubuntu-22.04
|
||||
# permissions:
|
||||
# contents: write
|
||||
@@ -513,7 +513,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
# needs: [get-version, check-version, create-release, package-tauri, package-android]
|
||||
needs: [get-version, check-version, create-release, package-tauri]
|
||||
environment: Production
|
||||
environment: ${{ github.ref == 'refs/heads/main' && 'Production' || '' }}
|
||||
if: needs.get-version.outputs.should-publish != '' && needs.check-version.outputs.should-skip != 'true'
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
Reference in New Issue
Block a user