Skip to content

chore(deps): update dependency microsoft.net.test.sdk to v18 (#142) #5

chore(deps): update dependency microsoft.net.test.sdk to v18 (#142)

chore(deps): update dependency microsoft.net.test.sdk to v18 (#142) #5

Workflow file for this run

name: release
on:
push:
tags:
- v*
env:
CONFIGURATION: Release
DOTNET_NOLOGO: true
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
release:
runs-on: windows-latest
timeout-minutes: 15
permissions:
packages: write
contents: write
id-token: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: restore
run: dotnet restore
- name: build
run: dotnet build --no-restore
- name: pack
run: dotnet pack --no-build -o bin
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: packages
path: bin/*.nupkg
# Get a short-lived NuGet API key
- name: NuGet login (OIDC → temp API key)
uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1.1.0
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: deploy github.com
run: find bin -name '*.nupkg' | xargs dotnet nuget push -s $NUGET_SOURCE -k $NUGET_KEY --skip-duplicate --force-english-output
shell: bash
env:
NUGET_SOURCE: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
NUGET_KEY: ${{ secrets.GITHUB_TOKEN }}
- name: deploy nuget.org
run: find bin -name '*.nupkg' | xargs dotnet nuget push -s $NUGET_SOURCE -k $NUGET_KEY --skip-duplicate --force-english-output
shell: bash
env:
NUGET_SOURCE: https://api.nuget.org/v3/index.json
NUGET_KEY: ${{ steps.login.outputs.NUGET_API_KEY }}
gh-release:
needs:
- release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0 # Important for changelog
filter: blob:none
show-progress: false
- name: prepare version
run: echo VERSION=${GITHUB_REF_NAME#v} >> $GITHUB_ENV # trim leading 'v' from tag name
- name: Generate changelog with git-cliff
uses: tj-actions/git-cliff@679041f051a4d2ab452f7e5e7b0eed2abee21131 # v2.2.0
with:
args: --latest --strip all
output: "CHANGELOG.md"
- name: Create Release
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
with:
bodyFile: "CHANGELOG.md"
name: ${{ env.VERSION }}
prerelease: ${{ contains(github.ref_name, '-') }}