1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-05 09:01:11 +01:00
bitwarden-mobile/.github/workflows/build.yml

95 lines
2.6 KiB
YAML
Raw Normal View History

2020-06-05 19:51:57 +02:00
name: Build
2020-06-08 18:14:10 +02:00
on:
push:
2020-06-08 18:17:53 +02:00
branches-ignore:
- 'l10n_master'
- 'gh-pages'
2020-06-05 19:51:57 +02:00
jobs:
android:
runs-on: windows-latest
steps:
2020-06-05 20:39:29 +02:00
- name: Set up NuGet
2020-06-05 20:40:44 +02:00
uses: nuget/setup-nuget@v1
2020-06-05 20:39:29 +02:00
with:
nuget-version: 'latest'
- name: Set up MSBuild
2020-06-05 20:40:44 +02:00
uses: microsoft/setup-msbuild@v1.0.0
2020-06-05 20:39:29 +02:00
2020-06-05 19:51:57 +02:00
- name: Print environment
run: |
2020-06-05 20:39:29 +02:00
nuget help
msbuild -version
2020-06-05 19:51:57 +02:00
- name: Checkout repo
uses: actions/checkout@v2
2020-06-08 18:14:10 +02:00
- name: Decrypt secrets
2020-06-08 18:17:53 +02:00
if: github.ref == 'refs/heads/master'
2020-06-08 18:25:39 +02:00
run: powershell Invoke-Expression "& './github/scripts/android/decrypt-secrets.ps1'"
2020-06-08 18:14:10 +02:00
env:
DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }}
- name: Increment version
2020-06-08 18:17:53 +02:00
if: github.ref == 'refs/heads/master'
2020-06-08 18:25:39 +02:00
run: powershell Invoke-Expression "& './github/scripts/android/increment-version.ps1'"
2020-06-08 18:14:10 +02:00
- name: Restore packages
run: nuget restore
2020-06-08 18:14:10 +02:00
- name: Build for Play Store
2020-06-08 18:17:53 +02:00
if: github.ref == 'refs/heads/master'
2020-06-08 18:25:39 +02:00
run: powershell Invoke-Expression "& './github/scripts/android/build-play.ps1'"
2020-06-08 18:14:10 +02:00
env:
PLAY_KEYSTORE_PASSWORD: ${{ secrets.PLAY_KEYSTORE_PASSWORD }}
UPLOAD_KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_PASSWORD }}
2020-06-05 19:51:57 +02:00
2020-06-08 18:17:53 +02:00
- name: Upload Play Store .aab
if: github.ref == 'refs/heads/master'
2020-06-08 18:14:10 +02:00
uses: actions/upload-artifact@v2
with:
name: com.x8bit.bitwarden.aab
path: ./com.x8bit.bitwarden.aab
2020-06-05 19:51:57 +02:00
2020-06-08 18:14:10 +02:00
- name: Upload Play Store .apk
2020-06-08 18:17:53 +02:00
if: github.ref == 'refs/heads/master'
2020-06-08 18:14:10 +02:00
uses: actions/upload-artifact@v2
with:
name: com.x8bit.bitwarden.apk
path: ./com.x8bit.bitwarden.apk
- name: Build for F-Droid Store
2020-06-08 18:17:53 +02:00
if: github.ref == 'refs/heads/master'
2020-06-08 18:25:39 +02:00
run: powershell Invoke-Expression "& './github/scripts/android/build-fdroid.ps1'"
2020-06-08 18:14:10 +02:00
env:
FDROID_KEYSTORE_PASSWORD: ${{ secrets.FDROID_KEYSTORE_PASSWORD }}
- name: Upload F-Droid .apk
2020-06-08 18:17:53 +02:00
if: github.ref == 'refs/heads/master'
2020-06-08 18:14:10 +02:00
uses: actions/upload-artifact@v2
with:
name: com.x8bit.bitwarden-fdroid.apk
path: ./com.x8bit.bitwarden-fdroid.apk
ios:
2020-06-05 19:51:57 +02:00
runs-on: macos-latest
steps:
- name: Print environment
run: |
2020-06-05 20:39:29 +02:00
nuget help
msbuild -version
2020-06-05 19:51:57 +02:00
- name: Checkout repo
uses: actions/checkout@v2
- name: Restore packages
run: nuget restore
2020-06-05 19:51:57 +02:00
- name: Build app
2020-06-05 21:31:30 +02:00
run: msbuild ./src/iOS/iOS.csproj /verbosity:normal /p:Platform=iPhone /p:Configuration=Debug