Properly configured build actions
This commit is contained in:
parent
a1ffc51a57
commit
165d97245d
@ -5,14 +5,12 @@ on: [ push ]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
# if: gitea.ref == 'refs/heads/main'
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@v4
|
||||
- uses: https://github.com/actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.x'
|
||||
# - name: "Build NuGet package"
|
||||
# run: cd MycroForge.CLI && dotnet pack -v d
|
||||
- name: "Build and publish NuGet package"
|
||||
run: |
|
||||
# Build the NuGet package
|
||||
@ -25,5 +23,7 @@ jobs:
|
||||
--store-password-in-clear-text \
|
||||
https://git.devdisciples.com/api/packages/devdisciples/nuget/index.json
|
||||
|
||||
VERSION=$(grep '<Version>' < MycroForge.CLI.csproj | sed 's/.*<Version>\(.*\)<\/Version>/\1/')
|
||||
|
||||
# Push the package
|
||||
dotnet nuget push nupkg/MycroForge.CLI.1.0.1.nupkg --source devdisciples
|
||||
dotnet nuget push nupkg/MycroForge.CLI.$VERSION.nupkg --source devdisciples
|
||||
|
@ -5,7 +5,7 @@ on: [ push ]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
if: gitea.ref == 'refs/heads/develop'
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@v4
|
||||
- uses: https://github.com/actions/setup-dotnet@v4
|
||||
|
@ -2,4 +2,6 @@
|
||||
|
||||
dotnet pack -v d
|
||||
|
||||
dotnet nuget push nupkg/MycroForge.CLI.1.0.0.nupkg --source devdisciples
|
||||
VERSION="1.0.0"
|
||||
|
||||
dotnet nuget push nupkg/MycroForge.CLI.$VERSION.nupkg --source devdisciples
|
||||
|
Loading…
Reference in New Issue
Block a user