ComLock Release #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: Decode Keystore | |
| run: | | |
| echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 -d > $GITHUB_WORKSPACE/comlock.keystore | |
| - name: Build Android APK | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/comlock.keystore | |
| ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
| ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
| ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| with: | |
| projectPath: ./comlock-app | |
| tagName: ${{ github.ref_name }} | |
| releaseName: 'ComLock ${{ github.ref_name }}' | |
| releaseBody: 'See the assets to download this version and install.' | |
| args: android build --apk | |
| # =========================================================================== | |
| # CREATE RELEASE | |
| # =========================================================================== | |
| create-release: | |
| runs-on: ubuntu-latest | |
| needs: [build-web, build-android] | |
| 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 |