Skip to content

Commit

Permalink
Merge pull request #264 from TNG/ci/add-deploy-step
Browse files Browse the repository at this point in the history
ci: add deploy job
  • Loading branch information
alexanderlinne authored May 24, 2024
2 parents 7b574cc + 9a94472 commit fabf95b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 37 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- "[0-9]+.[0-9]+.[0-9]+"
pull_request:
types: [opened, reopened, synchronize]

Expand Down Expand Up @@ -53,3 +55,27 @@ jobs:
dotnet-version: 8.0.300
- name: Run tests
run: dotnet test -c Debug
deploy:
name: Deploy
if: github.ref == 'refs/tags/[0-9]+.[0-9]+.[0-9]+'
runs-on: windows-latest
environment: deploy
needs:
- formatting
- coverage
- run-tests
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup .NET
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: 8.0.300
- name: Add package source
run: dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
- name: Build
run: dotnet build -c Release
- name: Pack
run: dotnet pack -c Release --output nupkgs -p:PackageVersion="${{ github.ref_name }}" -p:AssemblyVersion="${{ github.ref_name }}.0"
- name: Push
run: dotnet nuget push nupkgs/*.nupkg --source nuget.org --api-key ${{ secrets.NUGET_API_KEY }}
6 changes: 0 additions & 6 deletions Travis/deploy.ps1

This file was deleted.

3 changes: 0 additions & 3 deletions Travis/test_linux.sh

This file was deleted.

28 changes: 0 additions & 28 deletions Travis/test_windows.ps1

This file was deleted.

0 comments on commit fabf95b

Please sign in to comment.