Skip to content

test: rename files

test: rename files #21

Workflow file for this run

name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-*
env:
DOCKER_CLI_EXPERIMENTAL: enabled
TAG_FMT: "^refs/tags/(((.?[0-9]+){3,4}))$"
jobs:
tauri_release:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
- name: Sync node version and setup cache
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"
- name: Install frontend dependencies
run: yarn install
- name: Build the app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
app:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache gradle
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Install frontend dependencies
run: yarn install
- name: Build Site
run: yarn build
- name: Copy files
run: |-
git clone https://git.v0l.io/Kieran/snort_android.git
mkdir -p snort_android/app/src/main/assets/
cp packages/app/build/* snort_android/app/src/main/assets/
- name: Build AAB
working-directory: snort_android
run: ./gradlew clean bundleRelease --stacktrace
- name: Build APK
working-directory: snort_android
run: ./gradlew assembleRelease --stacktrace
- name: Sign AAB
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: snort_android/app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Sign APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: snort_android/app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Rename files
run: |-
mkdir -p snort_android/app/release
mv snort_android/app/build/outputs/bundle/release/app-release.aab snort_android/app/release/snort-${{ github.ref_name }}.aab
mv snort_android/app/build/outputs/apk/release/app-universal-release-unsigned.apk snort_android/app/release/snort-universal-${{ github.ref_name }}.apk
mv snort_android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk snort_android/app/release/snort-arm64-v8a-${{ github.ref_name }}.apk
mv snort_android/app/build/outputs/apk/release/app-x86_64-release-unsigned.apk snort_android/app/release/snort-x86_64-${{ github.ref_name }}.apk
mv snort_android/app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk snort_android/app/release/snort-armeabi-v7a-${{ github.ref_name }}.apk
- name: Upload assets
uses: softprops/action-gh-release@v1
with:
files: |
snort_android/app/release/snort-${{ github.ref_name }}.aab
snort_android/app/release/snort-universal-${{ github.ref_name }}.apk
snort_android/app/release/snort-arm64-v8a-${{ github.ref_name }}.apk
snort_android/app/release/snort-x86_64-${{ github.ref_name }}.apk
snort_android/app/release/snort-armeabi-v7a-${{ github.ref_name }}.apk