Update CI builds to no longer do a release build of the Example Client #68
Workflow file for this run
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: CI | |
on: [push] | |
jobs: | |
build: | |
name: Build Job | |
runs-on: macos-13 | |
defaults: | |
run: | |
working-directory: Source | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Required for Calculate Version step (e.g. GitVersion) | |
# Required by GitVersion | |
- name: Install .NET 6.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0 | |
- name: Install Workloads | |
run: dotnet workload restore | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v0.10.2 | |
with: | |
versionSpec: '5.12.0' | |
- name: Generate Version Info using GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/execute@v0.10.2 | |
with: | |
updateAssemblyInfo: true | |
- name: NuGet | |
run: dotnet restore | |
# Smoke test to make sure the Example Client builds. We don't do a release build | |
# of the Example Client because it takes a long time and we don't publicsh it. | |
- name: Debug Build of Solution to Smaoke test Example Client | |
run: dotnet build -c Debug | |
# Do release builds of the binding library for both the simulator and device. | |
- name: Release Build for Simulator | |
run: dotnet build SaturdayMP.XPlugins.iOS.BEMCheckBox/SaturdayMP.XPlugins.iOS.BEMCheckBox.csproj -c Release -p iPhoneSimulator | |
- name: Release Build for Device | |
run: dotnet build SaturdayMP.XPlugins.iOS.BEMCheckBox/SaturdayMP.XPlugins.iOS.BEMCheckBox.csproj -c Release -p AnyCPU | |
- name: Create NuGet Package | |
run: nuget pack SaturdayMP.XPlugins.iOS.BEMCheckBox.nuspec -properties Configuration=Release -Version ${{ steps.gitversion.outputs.nuGetVersionV2 }} | |
- name: Publish to MyGet | |
run: | | |
nuget setApiKey ${{ secrets.MYGET_API_KEY }} -Source https://www.myget.org/F/saturdaymp/api/v3/index.json | |
nuget push SaturdayMP.XPlugins.iOS.BEMCheckBox.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg -Source https://www.myget.org/F/saturdaymp/api/v3/index.json | |
# Only push tagged builds to NuGet. These will be production or release candidates. | |
- name: Upload to NuGet | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
run: dotnet nuget push SaturdayMP.XPlugins.iOS.BEMCheckBox.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate --no-symbols -s https://api.nuget.org/v3/index.json |