Skip to content

Commit

Permalink
Created build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jaime-olivares committed Jul 7, 2024
1 parent f595149 commit 6d33bdd
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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

0 comments on commit 6d33bdd

Please sign in to comment.