Skip to content

saamerm/Xamarin-GitHubActions-DevOps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xamarin-GitHubActions-DevOps

This repo contains the result of my work combining GitHub Actions with Xamarin to Automatically Build iOS & Android apps

You can take a look at the article here that has more details. It will also give you a better understanding of what you see in the Actions folder.

Also, here's a short snippet of what to do for GitLab

Where's the file published?

Right now, the file is published as an "artifact" ZIP file actions/upload-artifact#3 and can be found below your successful Action, as you can see here image

Build your Android code & Publish the Signed APK from the build

If you want to build and publish the APK, simply copy this into your repository's .github/workflows/main.yml file. Make sure to change Blank in all instances with your own Project/Solution name and change "com.tfp.blank" with the bundle identifier mentioned in your AndroidManifest file.

name: CI on Push and Pull Request
on: [push, pull_request]
jobs:
  Android:
    runs-on: macos-latest    
    steps:
    - uses: actions/checkout@v1      
    - name: Android
      run: |
        cd Blank
        nuget restore
        msbuild Blank.Android/Blank.Android.csproj /verbosity:normal /t:Rebuild /t:PackageForAndroid /t:SignAndroidPackage /p:Configuration=Debug 
    - uses: actions/upload-artifact@v2
      with:
        name: Android App
        path: Blank/Blank.Android/bin/Debug/com.tfp.blank-Signed.apk        

Build your iOS code & Publish the simulator APP from the build

If you want to build and publish the simulator APP file, simply copy this into your repository's .github/workflows/main.yml file. Make sure to change Blank in all instances with your own Project/Solution name.

name: CI on Push and Pull Request
on: [push, pull_request]
jobs:
  iOS:
    runs-on: macos-latest    
    steps:
    - name: Checkout repository
      uses: actions/checkout@v2        
    - name: iOS Simulator
      run: |
        cd Blank
        nuget restore
        msbuild Blank/Blank.iOS/Blank.iOS.csproj /verbosity:normal /t:Rebuild /p:Platform=iPhoneSimulator /p:Configuration=Debug        
    - uses: actions/upload-artifact@v2
      with:
        name: iOS Simulator App
        path: Blank/Blank.iOS/bin/iPhoneSimulator/Debug/Blank.iOS.app