Skip to content

Initial commit: ComLock Production Candidate #1

Initial commit: ComLock Production Candidate

Initial commit: ComLock Production Candidate #1

Workflow file for this run

name: ComLock Release
on:
push:
tags:
- 'v*'
jobs:
# ===========================================================================
# WEB BUILD
# ===========================================================================
build-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
working-directory: ./comlock-app
run: npm ci
- name: Build Web
working-directory: ./comlock-app
run: npm run build
- name: Zip Dist
working-directory: ./comlock-app
run: zip -r comlock-web-${{ github.ref_name }}.zip dist
- name: Upload Web Artifact
uses: actions/upload-artifact@v3
with:
name: web-dist
path: comlock-app/comlock-web-${{ github.ref_name }}.zip
# ===========================================================================
# ANDROID BUILD
# ===========================================================================
build-android:
runs-on: ubuntu-latest
needs: build-web
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
- name: Install dependencies
working-directory: ./comlock-app
run: npm ci
- name: Build Android APK
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: ./comlock-app
tagName: ${{ github.ref_name }}
releaseName: 'ComLock ${{ github.ref_name }}'
releaseBody: 'See the assets to download this version and install.'
modKey: ${{ secrets.ANDROID_KEYSTORE }}
args: android build --apk
# ===========================================================================
# iOS BUILD
# ===========================================================================
build-ios:
runs-on: macos-latest
needs: build-web
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-ios,x86_64-apple-ios
- name: Install dependencies
working-directory: ./comlock-app
run: npm ci
- name: Build iOS IPA
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_MOBILE_PROVISIONING_PROFILE: ${{ secrets.APPLE_MOBILE_PROVISIONING_PROFILE }}
with:
projectPath: ./comlock-app
tagName: ${{ github.ref_name }}
releaseName: 'ComLock ${{ github.ref_name }}'
releaseBody: 'See the assets to download this version and install.'
args: ios build
# ===========================================================================
# CREATE RELEASE
# ===========================================================================
create-release:
runs-on: ubuntu-latest
needs: [build-web, build-android, build-ios]
steps:
- uses: actions/download-artifact@v3
with:
name: web-dist
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
comlock-web-*.zip
comlock-app/src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
comlock-app/src-tauri/gen/apple/build/Release-iphoneos/comlock_app.ipa