Skip to content

Added github actions #16

Added github actions

Added github actions #16

Workflow file for this run

name: main
on:
push:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
- name: setup dotnet environment
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d
with:
dotnet-version: '9.0'
- name: restore dependencies
run: dotnet restore
- name: Run test
run: dotnet test --no-restore --verbosity normal
publish-artifacts:
runs-on: ubuntu-latest
name: publish artifacts
needs: test
steps:
- name: checkout code
uses: actions/checkout@v3
- name: setup dotnet environment
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d
with:
dotnet-version: '9.0'
- name: restore dependencies
run: dotnet restore
- name: generate nuget package
run: dotnet pack --configuration Release --output artifacts
- name: upload artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: artifact
path: /artifacts