Skip to content

Commit

Permalink
Merge pull request #5 from exomia/development
Browse files Browse the repository at this point in the history
workflow changed
  • Loading branch information
baetz-daniel authored Aug 2, 2020
2 parents 36585c5 + dc8c579 commit f2704f2
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build_test_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
branches:
- master
- development
release:
types: [published]
jobs:
build:
name: build release and debug
Expand Down Expand Up @@ -58,21 +60,27 @@ jobs:
dotnet test tests/L0/Exomia.ECS.Tests --configuration Release --nologo -p:Platform=x86
dotnet test tests/L0/Exomia.ECS.Tests --configuration Release --nologo -p:Platform=x64
publish:
name: build, pack & publish release
name: publish release or debug
needs: [test]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
if: ${{ github.event_name == 'release' }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: extract tag version & release or debug
run: |
echo ::set-env name=TAG_VERSION::${GITHUB_REF#refs/tags/v*}
grep -q '-' <<< ${GITHUB_REF#refs/tags/v*} && echo ::set-env name=TAG_CONFIGURATION::Debug || echo ::set-env name=TAG_CONFIGURATION::Release
shell: bash
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.300
- name: publish release
- name: publish release or debug
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
run: |
dotnet pack src/Exomia.ECS --configuration Release --verbosity m --force --nologo -p:Platform=AnyCPU
dotnet pack src/Exomia.ECS --configuration Release --verbosity m --force --nologo -p:Platform=x86
dotnet pack src/Exomia.ECS --configuration Release --verbosity m --force --nologo -p:Platform=x64
dotnet pack src/Exomia.ECS --configuration $TAG_CONFIGURATION --verbosity m --force --nologo -p:Platform=AnyCPU -p:Version=$TAG_VERSION
dotnet pack src/Exomia.ECS --configuration $TAG_CONFIGURATION --verbosity m --force --nologo -p:Platform=x86 -p:Version=$TAG_VERSION
dotnet pack src/Exomia.ECS --configuration $TAG_CONFIGURATION --verbosity m --force --nologo -p:Platform=x64 -p:Version=$TAG_VERSION
dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.EXOMIA_NUGET_API_KEY_PUSH }}
shell: bash

0 comments on commit f2704f2

Please sign in to comment.