mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 12:42:34 +00:00
chore(ci): check for platform flags in commit message
This commit is contained in:
168
.github/workflows/enable_check.yml
vendored
Normal file
168
.github/workflows/enable_check.yml
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
name: Enable Check
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
android:
|
||||
description: "Is Android Enabled?"
|
||||
value: ${{ jobs.android.outputs.android }}
|
||||
ios:
|
||||
description: "Is iOS Enabled?"
|
||||
value: ${{ jobs.ios.outputs.ios }}
|
||||
linux:
|
||||
description: "Is Linux Enabled?"
|
||||
value: ${{ jobs.linux.outputs.linux }}
|
||||
macos:
|
||||
description: "Is macOS Enabled?"
|
||||
value: ${{ jobs.macos.outputs.macos }}
|
||||
windows:
|
||||
description: "Is Windows Enabled?"
|
||||
value: ${{ jobs.windows.outputs.windows }}
|
||||
web:
|
||||
description: "Is Web Enabled?"
|
||||
value: ${{ jobs.web.outputs.web }}
|
||||
|
||||
jobs:
|
||||
android:
|
||||
name: Android
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
android: ${{ steps.output.outputs.enable }}
|
||||
steps:
|
||||
- name: Run Script
|
||||
id: script
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
MESSAGE: ${{ github.event.head_commit.message || '[platform:all]' }}
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const all = process.env.MESSAGE.includes("[platform:all]");
|
||||
const android = process.env.MESSAGE.includes("[platform:android]");
|
||||
return all || android;
|
||||
|
||||
- name: Set Output
|
||||
id: output
|
||||
run: |
|
||||
echo ${{ steps.script.outputs.result }}
|
||||
echo "::set-output name=enable::${{ steps.script.outputs.result }}"
|
||||
|
||||
ios:
|
||||
name: iOS
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
ios: ${{ steps.output.outputs.enable }}
|
||||
steps:
|
||||
- name: Run Script
|
||||
id: script
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
MESSAGE: ${{ github.event.head_commit.message || '[platform:all]' }}
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const all = process.env.MESSAGE.includes("[platform:all]");
|
||||
const ios = process.env.MESSAGE.includes("[platform:ios]");
|
||||
return all || ios;
|
||||
|
||||
- name: Set Output
|
||||
id: output
|
||||
run: |
|
||||
echo ${{ steps.script.outputs.result }}
|
||||
echo "::set-output name=enable::${{ steps.script.outputs.result }}"
|
||||
|
||||
linux:
|
||||
name: Linux
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
linux: ${{ steps.output.outputs.enable }}
|
||||
steps:
|
||||
- name: Run Script
|
||||
id: script
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
MESSAGE: ${{ github.event.head_commit.message || '[platform:all]' }}
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const all = process.env.MESSAGE.includes("[platform:all]");
|
||||
const linux = process.env.MESSAGE.includes("[platform:linux]");
|
||||
return all || linux;
|
||||
|
||||
- name: Set Output
|
||||
id: output
|
||||
run: |
|
||||
echo ${{ steps.script.outputs.result }}
|
||||
echo "::set-output name=enable::${{ steps.script.outputs.result }}"
|
||||
|
||||
macos:
|
||||
name: macOS
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
macos: ${{ steps.output.outputs.enable }}
|
||||
steps:
|
||||
- name: Run Script
|
||||
id: script
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
MESSAGE: ${{ github.event.head_commit.message || '[platform:all]' }}
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const all = process.env.MESSAGE.includes("[platform:all]");
|
||||
const macos = process.env.MESSAGE.includes("[platform:macos]");
|
||||
return all || macos;
|
||||
|
||||
- name: Set Output
|
||||
id: output
|
||||
run: |
|
||||
echo ${{ steps.script.outputs.result }}
|
||||
echo "::set-output name=enable::${{ steps.script.outputs.result }}"
|
||||
|
||||
windows:
|
||||
name: Windows
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
windows: ${{ steps.output.outputs.enable }}
|
||||
steps:
|
||||
- name: Run Script
|
||||
id: script
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
MESSAGE: ${{ github.event.head_commit.message || '[platform:all]' }}
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const all = process.env.MESSAGE.includes("[platform:all]");
|
||||
const windows = process.env.MESSAGE.includes("[platform:windows]");
|
||||
return all || windows;
|
||||
|
||||
- name: Set Output
|
||||
id: output
|
||||
run: |
|
||||
echo ${{ steps.script.outputs.result }}
|
||||
echo "::set-output name=enable::${{ steps.script.outputs.result }}"
|
||||
|
||||
web:
|
||||
name: Web
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
web: ${{ steps.output.outputs.enable }}
|
||||
steps:
|
||||
- name: Run Script
|
||||
id: script
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
MESSAGE: ${{ github.event.head_commit.message || '[platform:all]' }}
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const all = process.env.MESSAGE.includes("[platform:all]");
|
||||
const web = process.env.MESSAGE.includes("[platform:web]");
|
||||
return all || web;
|
||||
|
||||
- name: Set Output
|
||||
id: output
|
||||
run: |
|
||||
echo ${{ steps.script.outputs.result }}
|
||||
echo "::set-output name=enable::${{ steps.script.outputs.result }}"
|
||||
35
.github/workflows/publish.yml
vendored
35
.github/workflows/publish.yml
vendored
@@ -3,10 +3,28 @@ name: 'Publish Releases'
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
build-title:
|
||||
required: true
|
||||
type: string
|
||||
flavor:
|
||||
required: true
|
||||
type: string
|
||||
build-title:
|
||||
enable-android:
|
||||
required: true
|
||||
type: string
|
||||
enable-ios:
|
||||
required: true
|
||||
type: string
|
||||
enable-linux:
|
||||
required: true
|
||||
type: string
|
||||
enable-macos:
|
||||
required: true
|
||||
type: string
|
||||
enable-web:
|
||||
required: true
|
||||
type: string
|
||||
enable-windows:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
@@ -51,6 +69,7 @@ on:
|
||||
jobs:
|
||||
android-play-store:
|
||||
name: Play Store
|
||||
if: ${{ inputs.enable-android == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Environment
|
||||
@@ -90,6 +109,7 @@ jobs:
|
||||
|
||||
ios-app-store:
|
||||
name: App Store (iOS)
|
||||
if: ${{ inputs.enable-ios == 'true' }}
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Setup Environment
|
||||
@@ -117,6 +137,7 @@ jobs:
|
||||
|
||||
linux-snapcraft:
|
||||
name: Snapcraft
|
||||
if: ${{ inputs.enable-linux == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Environment
|
||||
@@ -136,6 +157,7 @@ jobs:
|
||||
|
||||
macos-appstore:
|
||||
name: App Store (macOS)
|
||||
if: ${{ inputs.enable-macos == 'true' }}
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Setup Environment
|
||||
@@ -163,6 +185,7 @@ jobs:
|
||||
|
||||
web-netlify:
|
||||
name: Netlify
|
||||
if: ${{ inputs.enable-web == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Environment
|
||||
@@ -205,6 +228,7 @@ jobs:
|
||||
|
||||
s3:
|
||||
name: S3
|
||||
if: ${{ inputs.enable-android == 'true' || inputs.enable-ios == 'true' || inputs.enable-linux == 'true' || inputs.enable-macos == 'true' || inputs.enable-windows == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Environment
|
||||
@@ -213,42 +237,49 @@ jobs:
|
||||
channel: s3
|
||||
|
||||
- name: Download Android App Package
|
||||
if: ${{ inputs.enable-android == 'true' }}
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: android-app-package
|
||||
path: ${{ github.workspace }}/output
|
||||
|
||||
- name: Download iOS App Package
|
||||
if: ${{ inputs.enable-ios == 'true' }}
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ios-appstore-package
|
||||
path: ${{ github.workspace }}/output
|
||||
|
||||
- name: Download Linux Snap
|
||||
if: ${{ inputs.enable-linux == 'true' }}
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: linux-snapcraft
|
||||
path: ${{ github.workspace }}/output
|
||||
|
||||
- name: Download macOS App Package
|
||||
if: ${{ inputs.enable-macos == 'true' }}
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: macos-app-package
|
||||
path: ${{ github.workspace }}/output
|
||||
|
||||
- name: Download macOS Disk Image
|
||||
if: ${{ inputs.enable-macos == 'true' }}
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: macos-disk-image
|
||||
path: ${{ github.workspace }}/output
|
||||
|
||||
- name: Download Windows App Package
|
||||
if: ${{ inputs.enable-windows == 'true' }}
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: windows-app-package
|
||||
path: ${{ github.workspace }}/output
|
||||
|
||||
- name: Download Windows MSIX Installer
|
||||
if: ${{ inputs.enable-windows == 'true' }}
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: windows-msix-installer
|
||||
@@ -300,7 +331,7 @@ jobs:
|
||||
case 'edge':
|
||||
default: return process.env.DISCORD_WEBHOOK_EDGE;
|
||||
}
|
||||
|
||||
|
||||
- name: Send Discord Message
|
||||
uses: sarisia/actions-status-discord@v1
|
||||
with:
|
||||
|
||||
49
.github/workflows/release.yml
vendored
49
.github/workflows/release.yml
vendored
@@ -18,8 +18,13 @@ on:
|
||||
- stable
|
||||
|
||||
jobs:
|
||||
enable:
|
||||
name: Enable
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/enable_check.yml@master
|
||||
|
||||
prepare:
|
||||
name: Prepare
|
||||
needs: [ enable ]
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/prepare.yml@master
|
||||
with:
|
||||
flavor: ${{ github.event.inputs.flavor || 'edge' }}
|
||||
@@ -35,7 +40,8 @@ jobs:
|
||||
|
||||
build-android:
|
||||
name: Build Android
|
||||
needs: [ prepare, validate ]
|
||||
needs: [ enable, prepare, validate ]
|
||||
if: ${{ needs.enable.outputs.android == 'true' }}
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/build_android.yml@master
|
||||
with:
|
||||
build-number: ${{ needs.prepare.outputs.build-number }}
|
||||
@@ -46,7 +52,8 @@ jobs:
|
||||
|
||||
build-ios:
|
||||
name: Build iOS
|
||||
needs: [ prepare, validate ]
|
||||
needs: [ enable, prepare, validate ]
|
||||
if: ${{ needs.enable.outputs.ios == 'true' }}
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/build_ios.yml@master
|
||||
with:
|
||||
build-number: ${{ needs.prepare.outputs.build-number }}
|
||||
@@ -63,12 +70,14 @@ jobs:
|
||||
|
||||
build-linux:
|
||||
name: Build Linux
|
||||
needs: [ prepare, validate ]
|
||||
needs: [ enable, prepare, validate ]
|
||||
if: ${{ needs.enable.outputs.linux == 'true' }}
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/build_linux.yml@master
|
||||
|
||||
build-macos:
|
||||
name: Build macOS
|
||||
needs: [ prepare, validate ]
|
||||
needs: [ enable, prepare, validate ]
|
||||
if: ${{ needs.enable.outputs.macos == 'true' }}
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/build_macos.yml@master
|
||||
with:
|
||||
build-number: ${{ needs.prepare.outputs.build-number }}
|
||||
@@ -88,9 +97,20 @@ jobs:
|
||||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
||||
MATCH_SSH_PRIVATE_KEY: ${{ secrets.MATCH_SSH_PRIVATE_KEY }}
|
||||
|
||||
build-web:
|
||||
name: Build Web
|
||||
needs: [ enable, prepare, validate ]
|
||||
if: ${{ needs.enable.outputs.web == 'true' }}
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/build_web.yml@master
|
||||
with:
|
||||
build-number: ${{ needs.prepare.outputs.build-number }}
|
||||
secrets:
|
||||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
|
||||
|
||||
build-windows:
|
||||
name: Build Windows
|
||||
needs: [ prepare, validate ]
|
||||
needs: [ enable, prepare, validate ]
|
||||
if: ${{ needs.enable.outputs.windows == 'true' }}
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/build_windows.yml@master
|
||||
secrets:
|
||||
CODE_SIGNING_CERTIFICATE: ${{ secrets.CODE_SIGNING_CERTIFICATE }}
|
||||
@@ -98,22 +118,21 @@ jobs:
|
||||
CODE_SIGNING_PUBLISHER: ${{ secrets.CODE_SIGNING_PUBLISHER }}
|
||||
CODE_SIGNING_PUBLISHER_NAME: ${{ secrets.CODE_SIGNING_PUBLISHER_NAME }}
|
||||
|
||||
build-web:
|
||||
name: Build Web
|
||||
needs: [ prepare, validate ]
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/build_web.yml@master
|
||||
with:
|
||||
build-number: ${{ needs.prepare.outputs.build-number }}
|
||||
secrets:
|
||||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
needs: [ prepare, build-android, build-ios, build-linux, build-macos, build-windows, build-web ]
|
||||
needs: [ enable, prepare, build-android, build-ios, build-linux, build-macos, build-web, build-windows ]
|
||||
if: ${{ always() }}
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/publish.yml@master
|
||||
with:
|
||||
flavor: ${{ github.event.inputs.flavor || 'edge' }}
|
||||
build-title: ${{ needs.prepare.outputs.build-title }}
|
||||
enable-android: ${{ needs.enable.outputs.android }}
|
||||
enable-ios: ${{ needs.enable.outputs.ios }}
|
||||
enable-linux: ${{ needs.enable.outputs.linux }}
|
||||
enable-macos: ${{ needs.enable.outputs.macos }}
|
||||
enable-web: ${{ needs.enable.outputs.web }}
|
||||
enable-windows: ${{ needs.enable.outputs.windows }}
|
||||
|
||||
secrets:
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APPLE_ITC_TEAM_ID: ${{ secrets.APPLE_ITC_TEAM_ID }}
|
||||
|
||||
Reference in New Issue
Block a user