chore: fix nuget package README.md path (?) #8
Workflow file for this run
This file contains hidden or 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: Release a new version of the plugin GitExtensions.AzureDevOpsCommitMessage | |
# Release is made by pushing a tag with format 'vX.Y.Z' (ex: v1.0.2) | |
# /!\ Ensure that the Repository secrets `NUGET_PUSH_TOKEN` is defined in github.org | |
# with a nuget.org token allowed to publish new packages | |
on: | |
push: | |
tags: | |
- 'v\d.\d.\d' | |
jobs: | |
release-plugin: | |
runs-on: [windows-latest] | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Extract version | |
shell: bash | |
run: echo "##[set-output name=version;]$(echo ${GITHUB_REF##*/v})" | |
id: extract_version | |
- name: Update version in csproj | |
uses: datamonsters/replace-action@v2 | |
with: | |
files: 'src/${{ github.event.repository.name }}/${{ github.event.repository.name }}.csproj' | |
replacements: '<VersionPrefix>0.0.0</VersionPrefix>=<VersionPrefix>${{ steps.extract_version.outputs.version }}</VersionPrefix>' | |
- name: Setup .net8 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.401 | |
- name: Build & package with `dotnet` | |
run: | | |
dotnet restore | |
dotnet pack -c Release | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}.nupkg | |
path: src/${{ github.event.repository.name }}/bin/Release/${{ github.event.repository.name }}.${{ steps.extract_version.outputs.version }}.nupkg | |
- name: Push to Nuget.org nuget feed | |
run: | | |
cd "src/${{ github.event.repository.name }}/bin/Release" | |
dotnet nuget push *.nupkg -k ${{ secrets.NUGET_PUSH_TOKEN }} -s https://api.nuget.org/v3/index.json -n |