Skip to content

Commit

Permalink
Runs only platform depending on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jigar-f committed Jan 8, 2025
1 parent 47cb9a9 commit 7108020
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ on:
macos_version:
type: string
required: true
platform:
type: string
required: true

jobs:
build:
Expand All @@ -52,18 +55,24 @@ jobs:
include:
- os: macos-latest
platform: macos
if: (${{ inputs.platform == 'desktop' }} || ${{ inputs.platform == 'all' }})
- os: windows-latest
platform: windows
if: (${{ inputs.platform == 'desktop' }} || ${{ inputs.platform == 'all' }})
- os: ubuntu-latest-16-cores
platform: android
target: apk
if: (${{ inputs.platform == 'android' }} || ${{ inputs.platform == 'all' }})
- os: ubuntu-latest-16-cores
platform: android
target: aab
if: (${{ inputs.platform == 'android' }} || ${{ inputs.platform == 'all' }})
- os: ubuntu-latest
platform: linux
if: (${{ inputs.platform == 'desktop' }} || ${{ inputs.platform == 'all' }})
- os: macos-latest
platform: ios
if: (${{ inputs.platform == 'ios' }} || ${{ inputs.platform == 'all' }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Publish releases
on:
# Triggers the workflow on push when pushing to a version tag
push:
branches:
- ci-android-fix
tags:
- '*lantern-*'
workflow_run:
Expand Down Expand Up @@ -38,7 +40,7 @@ jobs:
echo "Platform determined: android"
echo "platform=android" >> "$GITHUB_OUTPUT"
elif [[ $TAG == desktop-* ]]; then
echo "Platform determined: macos"
echo "Platform determined: desktop"
echo "platform=desktop" >> "$GITHUB_OUTPUT"
else
echo "Platform determined: all (tag did not match specific platforms)"
Expand All @@ -50,7 +52,7 @@ jobs:
fi
set-version:
needs: determine-platform
needs: determine-tag
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set-version.outputs.version }}
Expand Down Expand Up @@ -115,6 +117,7 @@ jobs:
dist-suffix: x64
installer-suffix: -x64
windows-arch: x64
platform: ${{ needs.determine-platform.outputs.platform }}

push-binaries:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 7108020

Please sign in to comment.