Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

fix: update access restrictions on TS object properties #211

fix: update access restrictions on TS object properties

fix: update access restrictions on TS object properties #211

Workflow file for this run

name: Build and test
on:
push:
branches: [ "dev", "main" ]
paths-ignore:
- '**.md'
pull_request:
branches: [ "dev" ]
paths-ignore:
- '**.md'
workflow_dispatch: { }
jobs:
build_apk:
name: Build APK
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 0
submodules: true
- name: Setup NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r25
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Install dependencies
run: sudo apt-get install build-essential cargo nodejs cmake ninja-build
- name: Change Gradle wrapper permissions
run: chmod +x ./gradlew
- name: Restore cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Assemble Release
run: ./gradlew assembleRelease
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
PublishToMaven: ${{ github.ref == 'refs/heads/main' }}
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-release
path: app/build/outputs/apk/release/app-release.apk
unit_test_debug:
name: Run local tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 0
submodules: true
- name: Setup NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r25
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Install dependencies
run: sudo apt-get install build-essential cargo nodejs cmake ninja-build
- name: Change Gradle wrapper permissions
run: chmod +x ./gradlew
- name: Restore cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run debug tests
run: ./gradlew testDebug --continue
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Upload test reports
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: test-reports
path: '**/build/reports/tests/'
publish:
name: Publish release
runs-on: ubuntu-latest
needs: [ build_apk, unit_test_debug ]
if: ${{ always() && github.event_name != 'pull_request' && needs.build_apk.result == 'success' && needs.unit_test_debug.result == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 0
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Install dependencies
run: sudo apt-get install build-essential cargo nodejs cmake ninja-build
- name: Change Gradle wrapper permissions
run: chmod +x ./gradlew
- name: Restore cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Publish release or snapshot
id: publish_release
run: |
./gradlew nyxMake nyxMark nyxPublish release --stacktrace
echo ::set-output name=exit_code::$?
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MVN_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MVN_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MVN_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.MVN_SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MVN_SIGNING_KEY_PASSWORD }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PublishToMaven: ${{ github.ref == 'refs/heads/main' }}
- name: Archive Nyx state file
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: .nyx-state-${{ github.job }}.json
path: build/nyx-state.json