Skip to content

Commit

Permalink
Reactived 'deploy'
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddenis-stx committed May 2, 2024
1 parent 293649b commit 53eef90
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,37 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
# deploy:
# needs: build
# # commit contains a tag => deploy
# if: startsWith( github.ref, 'refs/tags/v' )
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Setup .NET Core
# uses: actions/setup-dotnet@v3
# with:
# dotnet-version: 6.0.x
# - name: Set VERSION environment variable
# run: |
# echo GitHub_ref: $GITHUB_REF
# arrTag=(${GITHUB_REF//\// })
# VERSION="${arrTag[2]}"
# echo Version: $VERSION
# VERSION="${VERSION//v}"
# echo Clean Version: $VERSION
# echo "VERSION=${VERSION}" >> $GITHUB_ENV
# - name: Create Release NuGet package
# run: dotnet pack -v normal -c Release -p:PackageVersion=${{ env.VERSION }} -o nupkg src/Systemathics.Apis.csproj
# - name: Publish the package to nuget.org
# run: dotnet nuget push ./nupkg/Systemathics.Apis.${{ env.VERSION }}.nupkg -k $NUGET_ORG_TOKEN -s https://api.nuget.org/v3/index.json
# env:
# NUGET_ORG_TOKEN: ${{ secrets.NUGET_ORG_TOKEN }}
deploy:
needs: build
# commit contains a tag => deploy
if: startsWith( github.ref, 'refs/tags/v' )
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Set VERSION environment variable
run: |
echo GitHub_ref: $GITHUB_REF
arrTag=(${GITHUB_REF//\// })
VERSION="${arrTag[2]}"
echo Version: $VERSION
VERSION="${VERSION//v}"
echo Clean Version: $VERSION
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Create Release NuGet package
run: dotnet pack -v normal -c Release -p:PackageVersion=${{ env.VERSION }} -o nupkg src/Systemathics.Apis.csproj
- name: Publish the package to nuget.org
run: dotnet nuget push ./nupkg/Systemathics.Apis.${{ env.VERSION }}.nupkg -k $NUGET_ORG_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_ORG_TOKEN: ${{ secrets.NUGET_ORG_TOKEN }}


0 comments on commit 53eef90

Please sign in to comment.