Update .gitea/workflows/build_publish.yml
This commit is contained in:
@@ -21,8 +21,8 @@ jobs:
|
|||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build --no-restore
|
run: dotnet build --no-restore
|
||||||
pack:
|
version:
|
||||||
name: Pack
|
name: Determine version
|
||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.0.x
|
dotnet-version: 10.0.x
|
||||||
- name: Setup GitVersion
|
- name: Setup GitVersion
|
||||||
uses: gittools/actions/gitversion/setup@v4.2.0
|
uses: gittools/actions/gitversion/setup@v4.2.0
|
||||||
with:
|
with:
|
||||||
@@ -42,15 +42,27 @@ jobs:
|
|||||||
id: gitversion
|
id: gitversion
|
||||||
with:
|
with:
|
||||||
configFilePath: ./.gitea/config/gitversion.yml
|
configFilePath: ./.gitea/config/gitversion.yml
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.gitversion.outputs.SemVer }}
|
||||||
|
pack:
|
||||||
|
name: Pack
|
||||||
|
needs: version
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: 8.0.x
|
||||||
- name: Create NuGet package
|
- name: Create NuGet package
|
||||||
run: dotnet pack -c Release -p:Version=${{steps.gitversion.outputs.SemVer}} -p:PackageVersion=${{steps.gitversion.outputs.SemVer}} --output ./
|
run: dotnet pack -c Release -p:Version=${{needs.version.outputs.version}} -p:PackageVersion=${{needs.version.outputs.version}} --output ./
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: nuget
|
name: nuget
|
||||||
path: ./SimpleToolkit.Extensions.nupkg
|
path: ./SimpleToolkit.Extensions.nupkg
|
||||||
outputs:
|
outputs:
|
||||||
version: ${{ steps.gitversion.outputs.SemVer }}
|
version: ${{needs.version.outputs.version}}
|
||||||
publish:
|
publish:
|
||||||
name: Publish
|
name: Publish
|
||||||
needs: pack
|
needs: pack
|
||||||
|
|||||||
Reference in New Issue
Block a user