This repository has been archived by the owner on Nov 30, 2024. It is now read-only.
Fix crash #6
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 and publish packages | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
paths-ignore: | |
- '**/README.md' | |
jobs: | |
build: | |
name: Build and publish package | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 7.x.x | |
- name: Nerdbank.GitVersioning | |
uses: dotnet/nbgv@v0.4.2 | |
id: nbgv | |
with: | |
setAllVars: true | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'microsoft' | |
java-version: '11' | |
- name: Install MAUI Workloads | |
run: | | |
dotnet workload install android --ignore-failed-sources | |
dotnet workload install maui --ignore-failed-sources | |
- name: Build | |
run: dotnet build ./Maui.CommunityToolkit.TabView.Compat.sln --configuration Release | |
- name: Pack | |
run: dotnet pack ./Maui.CommunityToolkit.TabView.Compat.sln --output ./artifacts --configuration Release -p:Version=${{ steps.nbgv.outputs.SemVer2 }} | |
- name: Push Nupkg to GitHub Packages | |
if: github.ref == 'refs/heads/develop' | |
run: dotnet nuget push **\*.nupkg --api-key ${{ secrets.PACKAGEGH_TOKEN }} -s https://nuget.pkg.github.com/felipe.baltazar/index.json --skip-duplicate | |
- name: Publish to Nuget.org | |
if: github.ref == 'refs/heads/main' | |
run: dotnet nuget push **\*.nupkg --api-key ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json --skip-duplicate |