From c16743946a9a3faecae7d135b6cb6a128fbcf40b Mon Sep 17 00:00:00 2001 From: xivk Date: Thu, 25 Apr 2024 10:43:14 +0200 Subject: [PATCH] Added action to release. --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ccfbf97 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: .NET Core + +on: + push: + branches: [ main ] + +jobs: + build-and-test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + submodules: 'true' + - name: Setup .NET Core 6. + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + - name: Restore packages. + run: dotnet restore + - name: Build all projects. + run: dotnet build --configuration Release --no-restore + + - name: Unittests. + run: dotnet test + working-directory: ./test/OpenLR.Test/ + + - name: Nuget Pack + run: dotnet pack -c release + working-directory: ./src/OpenLR/ + - name: Nuget Pack + run: dotnet pack -c release + working-directory: ./src/OpenLR.Geo/ + + - name: Nuget push Github + run: dotnet nuget push **/*.nupkg --skip-duplicate -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/itinero/index.json + working-directory: ./src/ + + - name: Nuget push + run: dotnet nuget push **/*.nupkg --skip-duplicate -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json + working-directory: ./src/ \ No newline at end of file