Skip to content

Merge pull request #31 from saturdaymp/feature/add-sponsor-shield-to-… #98

Merge pull request #31 from saturdaymp/feature/add-sponsor-shield-to-…

Merge pull request #31 from saturdaymp/feature/add-sponsor-shield-to-… #98

Workflow file for this run

name: CI
on:
push:
branches: [ master, release/* ]
tags: [ v* ]
pull_request:
branches: [ master, release/* ]
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/[email protected]
with:
versionSpec: '5.12.0'
- name: Generate Version Info using GitVersion
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
additionalArguments: '/updateprojectfiles'
- 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 publish it.
- name: Debug Build of Solution to Smoke test Example Client
run: dotnet build -c Debug
- name: Create NuGet Package
run: dotnet pack SaturdayMP.XPlugins.iOS.BEMCheckBox/SaturdayMP.XPlugins.iOS.BEMCheckBox.csproj -c Release
- name: Publish to MyGet
run: dotnet nuget push SaturdayMP.XPlugins.iOS.BEMCheckBox/bin/Release/SaturdayMP.XPlugins.iOS.BEMCheckBox.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg -k ${{ secrets.MYGET_API_KEY }} -s 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/bin/Release/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