Skip to content

Commit

Permalink
#49 simplify ci
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Sep 25, 2020
1 parent 8605631 commit 50304e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 32 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,24 @@ jobs:
- name: Setup dotnet 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.402'
dotnet-version: '3.1.x'
- name: Setup dotnet 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.100-rc.1.20452.10'
- name: Restore
run: dotnet restore --locked-mode
- name: Tests Sitko.Core.Queue
run: dotnet test --no-restore $(pwd)/tests/Sitko.Core.Queue.Test/Sitko.Core.Queue.Tests.csproj
run: dotnet test $(pwd)/tests/Sitko.Core.Queue.Test/Sitko.Core.Queue.Tests.csproj
- name: Sitko.Core.Queue.Nats
run: dotnet test --no-restore $(pwd)/tests/Sitko.Core.Queue.Nats.Tests/Sitko.Core.Queue.Nats.Tests.csproj
run: dotnet test $(pwd)/tests/Sitko.Core.Queue.Nats.Tests/Sitko.Core.Queue.Nats.Tests.csproj
- name: Sitko.Core.Queue.InMemory
run: dotnet test --no-restore $(pwd)/tests/Sitko.Core.Queue.InMemory.Tests/Sitko.Core.Queue.InMemory.Tests.csproj
run: dotnet test $(pwd)/tests/Sitko.Core.Queue.InMemory.Tests/Sitko.Core.Queue.InMemory.Tests.csproj
- name: Sitko.Core.Queue.Repository
run: dotnet test --no-restore $(pwd)/tests/Sitko.Core.Repository.Tests/Sitko.Core.Repository.Tests.csproj
run: dotnet test $(pwd)/tests/Sitko.Core.Repository.Tests/Sitko.Core.Repository.Tests.csproj
- name: Sitko.Core.Queue.Sony
run: dotnet test --no-restore $(pwd)/tests/Sitko.Core.SonyFlake.Tests/Sitko.Core.SonyFlake.Tests.csproj
run: dotnet test $(pwd)/tests/Sitko.Core.SonyFlake.Tests/Sitko.Core.SonyFlake.Tests.csproj
- name: Sitko.Core.Queue.Storage.FileSystem
run: dotnet test --no-restore $(pwd)/tests/Sitko.Core.Storage.FileSystem.Tests/Sitko.Core.Storage.FileSystem.Tests.csproj
run: dotnet test $(pwd)/tests/Sitko.Core.Storage.FileSystem.Tests/Sitko.Core.Storage.FileSystem.Tests.csproj
- name: Sitko.Core.Queue.Storage.S3
run: dotnet test --no-restore $(pwd)/tests/Sitko.Core.Storage.S3.Tests/Sitko.Core.Storage.S3.Tests.csproj
run: dotnet test $(pwd)/tests/Sitko.Core.Storage.S3.Tests/Sitko.Core.Storage.S3.Tests.csproj
- name: Create packages
run: dotnet pack --no-restore -c Release /p:Version=$APP_VERSION
run: dotnet pack -c Release /p:Version=$APP_VERSION
22 changes: 1 addition & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,8 @@ jobs:
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo ::set-output name=version::${VERSION}
- name: Restore
run: dotnet restore --locked-mode
- name: Create packages
run: dotnet pack --no-restore -c Release /p:Version=${{ steps.prep.outputs.version }} -o $(pwd)/packages
run: dotnet pack -c Release /p:Version=${{ steps.prep.outputs.version }} -o $(pwd)/packages
- name: Push to Nuget
run: find $(pwd)/packages -name *.nupkg -exec dotnet nuget push {} -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} \;
- name: Download Sitko.Core
uses: actions/checkout@v2
with:
repository: "sitkoru/Sitko.Core"
path: proto
ref: "proto"
- name: Publish proto archive
if: github.ref == 'refs/heads/master'
run: |
tar czf proto/proto.tar.gz -C src/Sitko.Core.Grpc/Proto .
echo echo ${{ steps.prep.outputs.version }} > proto/VERSION
cd proto
git config user.name sitkobot
git config user.email bot@sitko.ru
git add proto.tar.gz
git add VERSION
git commit -m "publish proto archive ${{ steps.prep.outputs.version }}"
git push

0 comments on commit 50304e8

Please sign in to comment.