Skip to content

Commit

Permalink
Create canary_ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pixkk authored Oct 2, 2024
1 parent d3f6e40 commit 671756c
Showing 1 changed file with 119 additions and 0 deletions.
119 changes: 119 additions & 0 deletions .github/workflows/canary_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: CI

on:
workflow_call:
inputs:
version:
description: 'Canary version number'
default: '0.0.0'
required: true
type: string
env:
NODE_VERSION: 16
GOOGLE_SERVICE_INFO_PLIST: ${{secrets.GOOGLE_SERVICE_INFO_PLIST}}
jobs:
build:
name: Build web assets
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm i; cd NUXT; npm i
- name: Set App Version
working-directory: NUXT
run: sed -i 's/dev-local/${{ inputs.version }}/' nuxt.config.js
- name: Build web assets
working-directory: NUXT
run: npm run generate
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
android:
name: Build Android platform
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm i
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'oracle'
- name: Copy web assets to native platform
run: npx cap copy android
- name: Update native platform
run: npx cap update android
- name: Build with Gradle
working-directory: android
run: chmod +x gradlew; ./gradlew clean assembleRelease -x test -Pandroid.injected.signing.store.file=/home/runner/work/VueTube/VueTube/android/key.jks -Pandroid.injected.signing.store.password=${{ secrets.ANDROID_STORE_PASSWORD }} -Pandroid.injected.signing.key.alias=${{ secrets.ANDROID_KEY_ALIAS }} -Pandroid.injected.signing.key.password=${{ secrets.ANDROID_KEY_PASSWORD }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: app-release
path: android/app/build/outputs/apk/release/app-release.apk
ios:
name: Build iOS platform
runs-on: macos-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm i
- name: Copy web assets to native platform
run: npx cap copy ios
- name: Update native platform
run: npx cap update ios
- name: Set up XCode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Add `GoogleService-Info.plist`
run: echo "${{ env.GOOGLE_SERVICE_INFO_PLIST }}" > ios/App/App/GoogleService-Info.plist
- name: Build and archive with xcodebuild
working-directory: ios
run: xcodebuild
-workspace App/App.xcworkspace
-scheme App
-archivePath App/build/App.xarchive
clean build archive
CODE_SIGN_IDENTITY=""
CODE_SIGNING_REQUIRED=NO
CODE_SIGNING_ALLOWED="NO"
CODE_SIGN_ENTITLEMENTS=""
- name: Make IPA
run: mkdir Payload && mv ~/Library/Developer/Xcode/DerivedData/App-*/Build/Products/Debug-iphoneos/App.app/ Payload && zip -r Payload.zip Payload && mv Payload.zip VueTube.ipa

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: VueTube
path: VueTube.ipa

0 comments on commit 671756c

Please sign in to comment.