Skip to content

Commit c2087bd

Browse files
committed
Fixing issue with CI not finding version
1 parent 8d81258 commit c2087bd

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
tags:
1010
- "v[0-9]+.[0-9]+.[0-9]+"
1111

12+
env:
13+
# Set the name of the project
14+
PROJECT: "MangaDexSharp"
15+
1216
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1317
jobs:
1418
# This workflow contains a single job called "build"
@@ -31,12 +35,17 @@ jobs:
3135
id: version
3236
run: |
3337
echo "version-without-v=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
38+
echo "csproj=./src/${{ env.PROJECT }}/${{ env.PROJECT }}.csproj" >> $GITHUB_OUTPUT
39+
40+
- name: Build Package
41+
run: dotnet build -c Release -p:Version=${{ steps.version.outputs.version-without-v }} ${{ steps.version.outputs.csproj }}
3442

3543
- name: Publish Extensions Nuget Package
3644
id: publish_nuget_extensions
3745
uses: alirezanet/publish-nuget@v3.0.4
3846
with:
39-
PROJECT_FILE_PATH: src/MangaDexSharp/MangaDexSharp.csproj
47+
PROJECT_FILE_PATH: ${{ steps.version.outputs.csproj }}
48+
NO_BUILD: true
4049
TAG_COMMIT: false
4150
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
4251
VERSION_STATIC: ${{ steps.version.outputs.version-without-v }}

0 commit comments

Comments
 (0)