0.2.3 #17
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: Nuget Package Deploy | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 'true' | |
steps: | |
- name: Setup .Net | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
8.0.x | |
9.0.x | |
- uses: actions/checkout@v4 | |
- name: Fetch all history for all tags and branches | |
run: git fetch --prune --unshallow | |
- run: | | |
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" | |
echo "NuGetPreReleaseTagV2 (not used): ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}" | |
- name: Tool restore | |
run: dotnet tool restore | |
- name: Restore | |
run: dotnet restore --nologo | |
- uses: ./.github/actions/version | |
id: version | |
- name: Build with .Net | |
run: dotnet build --configuration Release --no-restore --nologo "-p:Version=${{ steps.version.outputs.enhancedVersion }}" | |
- name: Pack with .Net | |
run: | | |
dotnet pack --nologo --no-build --configuration Release --output nuget-packages -p:PackageVersion=${{ steps.version.outputs.enhancedVersion }} src/Apple.AppStoreConnect/Apple.AppStoreConnect.csproj | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Nuget-packages-${{ steps.version.outputs.enhancedVersion }} | |
path: nuget-packages | |
- name: Configure Github Nuget Feed | |
run: dotnet nuget add source --name github https://nuget.pkg.github.com/aviationexam/index.json | |
- name: Push package to Github Packages | |
run: dotnet nuget push 'nuget-packages/*.nupkg' --api-key ${{ secrets.GITHUB_TOKEN }} --source github | |
- name: Push package to Nuget | |
run: dotnet nuget push 'nuget-packages/*.nupkg' --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json |