Skip to content

Commit

Permalink
Added action.yml file tp publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
saamerm committed Apr 25, 2021
1 parent a65fa6a commit ac2b45b
Showing 1 changed file with 112 additions and 0 deletions.
112 changes: 112 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: CI on Push and Pull Request

on: [push, pull_request]

jobs:
Practice:

runs-on: macos-latest

steps:
- uses: actions/checkout@v1
- name: Run a one-line script
run: echo Hello, world!
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
- name: Show what in there
run: |
ls
- name: Show what is inside
run: |
cd ..
ls
Android:

runs-on: macos-latest

steps:

- uses: actions/checkout@v1

- name: Android
run: |
cd Blank
nuget restore
cd Blank.Android
msbuild 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

iOS_Simulator:

runs-on: macos-latest

steps:

- name: Checkout repository
uses: actions/checkout@v2

- name: iOS Simulator
run: |
cd Blank
nuget restore
msbuild 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

iOS_Device:

runs-on: macos-latest

steps:

- name: Checkout repository
uses: actions/checkout@v2
- name: Install the Apple certificate and provisioning profile
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH
# create temporary keychain
security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: iOS Device
run: |
cd Blank
nuget restore
msbuild Blank.iOS/Blank.iOS.csproj /verbosity:normal /t:Rebuild /p:Platform=iPhone /p:Configuration=Debug
- uses: actions/upload-artifact@v2
with:
name: iOS Device App
path: Blank/Blank.iOS/bin/iPhone/Debug/Blank.iOS.app

0 comments on commit ac2b45b

Please sign in to comment.