Last active
January 26, 2022 18:41
-
-
Save Sweekriti91/d57190d1c4a88986b4eaecd6e0cd598a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build MacCatalyst | |
# https://github.com/actions/virtual-environments | |
on: | |
# push: | |
# branches: [ main ] | |
# pull_request: | |
# branches: [ main ] | |
workflow_dispatch: | |
env: | |
DOTNETVERSION: 6.0.200 | |
MAUIROLLBACKLINK: https://aka.ms/dotnet/maui/preview.12.json | |
jobs: | |
buildmac: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core SDK ${{env.DOTNETVERSION}} | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '${{env.DOTNETVERSION}}' | |
- name: Install .NET MAUI | |
shell: bash | |
run: | | |
dotnet nuget locals all --clear | |
dotnet workload install maui --from-rollback-file ${{env.MAUIROLLBACKLINK}} --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json | |
dotnet workload install android ios maccatalyst tvos macos maui wasm-tools --from-rollback-file ${{env.MAUIROLLBACKLINK}} --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json | |
- name: Restore nuget packages | |
run: dotnet restore <path_to_solution> | |
- name: Build MacCatalyst App | |
shell: bash | |
run: | | |
dotnet build -f net6.0-maccatalyst -c Release -o ./artifacts | |
dotnet publish -f net6.0-maccatalyst -c Release -p:BuildIpa=True -o ./artifacts | |
- name: Distribute to App Center | |
shell: bash | |
env: | |
APPCENTER_TOKEN: ${{ secrets.APP_CENTER_TOKEN }} | |
run: | | |
npm install -g appcenter-cli | |
appcenter distribute release --file <path_to_package> --release-notes "Release from GitHub Actions" --group <GROUP_NAME> --app <APP_CENTER_ORG/APP_NAME> --build-version 1.0 --build-number $GITHUB_RUN_NUMBER --token $APPCENTER_TOKEN | |
- uses: actions/upload-artifact@v2 | |
if: ${{ false }} | |
with: | |
name: artifacts-mac | |
path: | | |
<path_to_package> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment