Update to GitExtensions v5.0 #1
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: Release a new version of the plugin | |
# Release is made by pushin a tag with format 'vX.Y.Z' (ex: v1.0.2) | |
on: | |
push: | |
tags: | |
- 'v\d.\d.\d' | |
jobs: | |
build: | |
runs-on: [windows-latest] | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
steps: | |
- uses: actions/checkout@v1 | |
- 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@v1 | |
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@v1 | |
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 |