Skip to content

Commit

Permalink
migrate to github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
val antonini committed Apr 25, 2024
1 parent 2437129 commit c47d2b6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 22 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: .NET Core CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.101

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore

- name: Test
run: dotnet test --no-build --verbosity normal

package:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.101

- name: Pack
run: dotnet pack -c Release /p:PackageVersion=${GITHUB_REF#refs/tags/v}

- name: Push
run: dotnet nuget push AStar/bin/Release/AStarLite.${GITHUB_REF#refs/tags/v}.nupkg -s https://www.nuget.org/api/v2/package -k ${{ secrets.NUGET_API_KEY }}
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

0 comments on commit c47d2b6

Please sign in to comment.