You've already forked android-client
mirror of
https://github.com/netbirdio/android-client.git
synced 2026-05-22 17:10:49 -07:00
d277cf686d
* Add network change detector and listeners * Add network toggle listener to VPNService * Add unit tests for ConcreteNetworkChangeListener * Rename NetworkChangeListener to NetworkAvailabilityListener * Change EngineRunner's Set implementation From HashSet to ConcurrentHashMap's KeySet, which is thread-safe. * Update submodule to the latest tag (v0.59.6) * Add EngineRestarter to restart the Go engine * Add LOGTAG to NetworkChangeDetector * Add some documentation to NetworkToggleListener * Use EngineRestarter as implementation of NetworkToggleListener When subscribing to ConcreteNetworkAvailabilityListener * Replace HashMap usage with ConcurrentHashMap The availableNetworkTypes HashMap is accessed from network callback threads without synchronization * Wrap connectivityManager.unregisterNetworkCallback with try-catch * Add restart runnable and timeout callback to EngineRestarter Restart runnable is used as a debouncing mechanism to prevent concurrent restarts Timeout callback is to reset the isRestartInProgress flag's value if the engine takes too long to restart * Update git submodule reference to latest tag * Reverse cleanup order on VPNService's onDestroy Now it disposes of network listener components before stopping engineRunner * Ci tests (#99) Add testing steps for CI * Remove line break --------- Co-authored-by: Zoltan Papp <zoltan.pmail@gmail.com>
63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
name: build release
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-release:
|
|
runs-on: ubuntu-latest
|
|
environment: android-release
|
|
env:
|
|
NETBIRD_UPLOAD_KEY_ALIAS: ${{ secrets.NETBIRD_UPLOAD_KEY_ALIAS }}
|
|
NETBIRD_UPLOAD_KEY_PASSWORD: ${{ secrets.NETBIRD_UPLOAD_KEY_PASSWORD }}
|
|
NETBIRD_UPLOAD_STORE_PASSWORD: ${{ secrets.NETBIRD_UPLOAD_STORE_PASSWORD }}
|
|
outputs:
|
|
apk_path: ${{ steps.build.outputs.apk_path }}
|
|
bundle_path: ${{ steps.build.outputs.bundle_path }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Get version
|
|
id: version
|
|
run: |
|
|
TAG_NAME=${{ github.event.release.tag_name }}
|
|
echo "version_name=$TAG_NAME" >> $GITHUB_OUTPUT
|
|
|
|
- name: Write google-services.json
|
|
run: |
|
|
echo "${{ secrets.GOOGLE_JSON }}" | base64 -d > app/google-services.json
|
|
|
|
- name: Write keystore file
|
|
run: |
|
|
echo "${{ secrets.GPLAY_KEYSTORE }}" | base64 -d > gplay.keystore
|
|
echo "NETBIRD_UPLOAD_STORE_FILE=$GITHUB_WORKSPACE/gplay.keystore" >> $GITHUB_ENV
|
|
|
|
- name: Compute version code
|
|
id: version_code
|
|
run: |
|
|
adjusted=$(( ${{ github.run_number }} + 40 ))
|
|
echo "adjusted=$adjusted" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build Android
|
|
id: build
|
|
uses: ./.github/actions/build-android
|
|
with:
|
|
version_name: ${{ steps.version.outputs.version_name }}
|
|
version_code: ${{ steps.version_code.outputs.adjusted }}
|
|
build_type: release
|
|
|
|
- name: Upload files to existing release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
${{ steps.build.outputs.apk_path }}
|
|
${{ steps.build.outputs.bundle_path }}
|
|
tag_name: ${{ github.event.release.tag_name }}
|