Skip to content

Created build workflow #1

Created build workflow

Created build workflow #1

Workflow file for this run

name: CI
on:
push:
branches:
- master
paths-ignore:
- README.md
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Compile source
run: dotnet build src/*.csproj --configuration Release
- name: Run unit tests
run: dotnet test test/*.csproj --logger:trx --configuration Release
env:
TEST_TITLE: ZipStorer unit test
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Prepare NuGet package
run: dotnet pack **/ZipStorer.csproj --configuration Release
- name: Publish NuGet package
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push **/*.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json