Skip to content

Commit

Permalink
update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-heinz committed Mar 5, 2020
1 parent 73df42b commit 5f081b4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,24 @@ jobs:
- name: Build Release
id: build_release
run: |
echo "::set-env name=PROJECT_FOLDER::Arrowgene.ENet"
echo "::set-env name=PROJECT_NAME::Arrowgene.ENet"
VERSION_FILE=${{ github.workspace }}/.version
VERSION=$(<"$VERSION_FILE")
echo ::set-env name=VERSION::$VERSION
echo ::set-env name=VERSION_E::$(echo ${GITHUB_SHA} | cut -c1-8)
mkdir ./release
for RUNTIME in win-x86 win-x64 linux-x64 osx-x64; do
# Server
dotnet publish ${{ env.PROJECT_FOLDER }}/${{ env.PROJECT_NAME }}.csproj --self-contained true /p:PublishTrimmed=true /p:Version=$VERSION /p:FromMSBuild=true --runtime $RUNTIME --configuration Release --output ./publish/$RUNTIME-$VERSION
dotnet publish Arrowgene.ENet/Arrowgene.ENet.csproj --self-contained true /p:PublishTrimmed=true /p:Version=$VERSION /p:FromMSBuild=true --runtime $RUNTIME --configuration Release --output ./publish/$RUNTIME-$VERSION
# Pack
tar cjf ./release/$RUNTIME-$VERSION.tar.gz ./publish/$RUNTIME-$VERSION
done
- name: Publish NuGet
id: publish_nuget
run: |
dotnet pack ${{ env.PROJECT_FOLDER }}/${{ env.PROJECT_NAME }}.csproj --output ../nupkgs /p:Version=${{ env.VERSION }}
curl -vX PUT -u "sebastian-heinz:${{ secrets.GITHUB_TOKEN }}" -F package=@../nupkgs/${{ env.PROJECT_NAME }}.${{ env.VERSION }}.nupkg https://nuget.pkg.github.com/sebastian-heinz/
dotnet nuget push ../nupkgs/${{ env.PROJECT_NAME }}.${{ env.VERSION }}.nupkg --source https://www.nuget.org/api/v2/package --api-key ${{ secrets.NUGET_DEPLOY_KEY }}
dotnet pack Arrowgene.ENet/Arrowgene.ENet.csproj --output ../nupkgs /p:Version=${{ env.VERSION }}
curl -vX PUT -u "sebastian-heinz:${{ secrets.GITHUB_TOKEN }}" -F package=@../nupkgs/Arrowgene.ENet.${{ env.VERSION }}.nupkg https://nuget.pkg.github.com/sebastian-heinz/
dotnet nuget push ../nupkgs/Arrowgene.ENet.${{ env.VERSION }}.nupkg --source https://www.nuget.org/api/v2/package --api-key ${{ secrets.NUGET_DEPLOY_KEY }}
- name: Create Release
id: create_release
Expand Down

0 comments on commit 5f081b4

Please sign in to comment.