Skip to content

last fix

last fix #214

Workflow file for this run

name: release
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
env:
Configuration: Release
Version: ${{ vars.MAJORVERSION }}.${{ vars.MINORVERSION }}.${{ github.run_number }}.${{ vars.REVISION }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9
#dotnet-quality: 'preview'
source-url: https://pkgs.dev.azure.com/fizzcode/ArtifactFeed/_packaging/FizzSuiteFeed/nuget/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_DEVOPS_APIKEY }}
- name: Restore
run: dotnet restore FizzCode.EtLast.sln /p:Configuration=${{ env.Configuration }} --verbosity normal
- name: Build
run: dotnet build FizzCode.EtLast.sln --configuration ${{ env.Configuration }} --no-restore /p:Version=${{ env.Version }} --verbosity normal
- name: Test
run: dotnet test FizzCode.EtLast.sln --configuration ${{ env.Configuration }} --no-build /p:Version=${{ env.Version }} --verbosity normal
- name: Pack
run: dotnet pack FizzCode.EtLast.sln --configuration ${{ env.Configuration }} --no-build /p:Version=${{ env.Version }} --verbosity normal --output .packages
- name: Push to GitHub Packages
run: dotnet nuget push .packages\*.nupkg --source https://nuget.pkg.github.com/FizzcodeSoftware/index.json --api-key ${{ secrets.GITHUB_TOKEN }}
- name: Push to nuget.org
run: dotnet nuget push .packages\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_ORG_APIKEY }}
- name: Push to AzureDevops
run: dotnet nuget push .packages\*.nupkg --source https://pkgs.dev.azure.com/fizzcode/ArtifactFeed/_packaging/FizzSuiteFeed/nuget/v3/index.json --api-key AzureArtifacts
- name: Create tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/v${{ env.Version }}',
sha: context.sha
})