1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-06-27 10:44:49 +02:00
bitwarden-mobile/.github/workflows/build.yml
2020-06-08 12:55:02 -04:00

99 lines
2.5 KiB
YAML

name: Build
on:
push:
branches-ignore:
- 'l10n_master'
- 'gh-pages'
jobs:
android:
runs-on: windows-latest
steps:
- name: Set up NuGet
uses: nuget/setup-nuget@v1
with:
nuget-version: 'latest'
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.0.0
- name: Print environment
run: |
nuget help
msbuild -version
- name: Checkout repo
uses: actions/checkout@v2
- name: Decrypt secrets
if: github.ref == 'refs/heads/master'
run: ./.github/scripts/android/decrypt-secrets.ps1
shell: pwsh
env:
DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }}
- name: Increment version
if: github.ref == 'refs/heads/master'
run: ./.github/scripts/android/increment-version.ps1
shell: pwsh
- name: Restore packages
run: nuget restore
- name: Build for Play Store
if: github.ref == 'refs/heads/master'
run: ./.github/scripts/android/build-play.ps1
shell: pwsh
env:
PLAY_KEYSTORE_PASSWORD: ${{ secrets.PLAY_KEYSTORE_PASSWORD }}
UPLOAD_KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_PASSWORD }}
- name: Upload Play Store .aab
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v2
with:
name: com.x8bit.bitwarden.aab
path: ./com.x8bit.bitwarden.aab
- name: Upload Play Store .apk
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v2
with:
name: com.x8bit.bitwarden.apk
path: ./com.x8bit.bitwarden.apk
- name: Build for F-Droid Store
if: github.ref == 'refs/heads/master'
run: ./.github/scripts/android/build-fdroid.ps1
shell: pwsh
env:
FDROID_KEYSTORE_PASSWORD: ${{ secrets.FDROID_KEYSTORE_PASSWORD }}
- name: Upload F-Droid .apk
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v2
with:
name: com.x8bit.bitwarden-fdroid.apk
path: ./com.x8bit.bitwarden-fdroid.apk
ios:
runs-on: macos-latest
steps:
- name: Print environment
run: |
nuget help
msbuild -version
- name: Checkout repo
uses: actions/checkout@v2
- name: Restore packages
run: nuget restore
- name: Build app
run: msbuild ./src/iOS/iOS.csproj /verbosity:normal /p:Platform=iPhone /p:Configuration=Debug