Skip to content

🚀 release 3.0.0 version #6

🚀 release 3.0.0 version

🚀 release 3.0.0 version #6

Workflow file for this run

name: Publish package on NuGet
on:
push:
branches: [master]
jobs:
job_1:
name: RepositoryHelpers Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"
- name: Restore dependencies
run: dotnet restore
working-directory: "RepositoryHelpers/"
- name: Build
run: dotnet build . --configuration Release --no-restore
working-directory: "RepositoryHelpers/"
job_2:
name: RepositoryHelpers release publish
needs: job_1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"
- name: Fetch all repository
run: git fetch --unshallow
- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
- name: Change version on csproj file
run: sed -i -e 's/PackageVersion>[0-9a-z.-]*</PackageVersion>'$GITVERSION_NUGETVERSION'</' RepositoryHelpers/RepositoryHelpers.csproj
- name: Restore dependencies
run: dotnet restore
working-directory: "RepositoryHelpers/"
- name: Build
run: dotnet build . --configuration Release --no-restore
working-directory: "RepositoryHelpers/"
- name: Publish NuGet
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: RepositoryHelpers/RepositoryHelpers.csproj
NUGET_KEY: ${{secrets.NUGET_TOKEN}}
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$