File tree Expand file tree Collapse file tree 3 files changed +24
-8
lines changed
Expand file tree Collapse file tree 3 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 1919 - uses : actions/setup-dotnet@v1
2020 with :
2121 dotnet-version : " 5.0.x"
22+ - name : Set RELEASE_VERSION
23+ run : echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
2224 - name : Restore Packages
2325 run : dotnet restore
2426 - name : Build
2527 run : dotnet build --configuration Release --verbosity minimal
2628 - name : Test
2729 run : dotnet test SpotifyAPI.Web.Tests
30+ - name : Publish to NuGET
31+ run : ./publish.sh
32+ if : startsWith( github.ref, 'refs/tags/')
33+ env :
34+ NUGET_TOKEN : ${{ secrets.NUGET_TOKEN }}
35+ - name : Publish to GH Release
36+ uses : actions/create-release@v1
37+ if : startsWith( github.ref, 'refs/tags/')
38+ env :
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40+ with :
41+ tag_name : ${{ github.ref }}
42+ release_name : SpotifyAPI Web ${{ RELEASE_VERSION }}
43+ body : |
44+ TODO
45+ draft : true
46+ prerelease : false
Original file line number Diff line number Diff line change 2626 <NoWarn >1591</NoWarn >
2727 </PropertyGroup >
2828
29- <PropertyGroup Condition =" '$(APPVEYOR )' == 'true'" >
29+ <PropertyGroup Condition =" '$(GITHUB_ACTIONS )' == 'true'" >
3030 <ContinuousIntegrationBuild >true</ContinuousIntegrationBuild >
3131 </PropertyGroup >
3232
Original file line number Diff line number Diff line change 44
55echo " Publishing..."
66
7- sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
8- alias nuget=" mono /usr/local/bin/nuget.exe"
9-
107cd ./SpotifyAPI.Web
11- dotnet pack -c Release SpotifyAPI.Web.csproj -p:PackageVersion=" $APPVEYOR_REPO_TAG_NAME "
12- nuget push " ./bin/Release/SpotifyAPI.Web.$APPVEYOR_REPO_TAG_NAME .nupkg" \
8+ dotnet pack -c Release SpotifyAPI.Web.csproj -p:PackageVersion=" $RELEASE_VERSION "
9+ nuget push " ./bin/Release/SpotifyAPI.Web.$RELEASE_VERSION .nupkg" \
1310 -ApiKey " $NUGET_TOKEN " \
1411 -NonInteractive\
1512 -Source https://www.nuget.org/api/v2/package
1613
1714cd ../SpotifyAPI.Web.Auth
18- dotnet pack -c Release SpotifyAPI.Web.Auth.csproj -p:PackageVersion=" $APPVEYOR_REPO_TAG_NAME "
19- nuget push " ./bin/Release/SpotifyAPI.Web.Auth.$APPVEYOR_REPO_TAG_NAME .nupkg" \
15+ dotnet pack -c Release SpotifyAPI.Web.Auth.csproj -p:PackageVersion=" $RELEASE_VERSION "
16+ nuget push " ./bin/Release/SpotifyAPI.Web.Auth.$RELEASE_VERSION .nupkg" \
2017 -ApiKey " $NUGET_TOKEN " \
2118 -NonInteractive\
2219 -Source https://www.nuget.org/api/v2/package
You can’t perform that action at this time.
0 commit comments