Skip to content

Commit

Permalink
CI/CD configs were added
Browse files Browse the repository at this point in the history
  • Loading branch information
litichevskiydv committed Jun 27, 2024
1 parent 3e4e11c commit 3bc416e
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/pushOrPullRequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Push or Pull request
on:
push:
pull_request:

jobs:
push:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os }}
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install packages
run: dotnet restore

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

- name: Test
run: dotnet test --no-build
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish

on:
release:
types: [released]

jobs:
publish:
runs-on: ubuntu-latest

env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install packages
run: dotnet restore

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

- name: Test
run: dotnet test --configuration Release --no-build

- name: Create package(s)
run: dotnet pack --configuration Release --no-build

- name: Publish packages
run: dotnet nuget push **/*.nupkg -k ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
32 changes: 32 additions & 0 deletions .github/workflows/releasePrerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish

on:
release:
types: [prereleased]

jobs:
publish:
runs-on: ubuntu-latest

env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install packages
run: dotnet restore

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

- name: Test
run: dotnet test --configuration Release --no-build

- name: Create package(s)
run: dotnet pack --version-suffix ${{format('tags-{0}', github.ref_name)}} --configuration Release --no-build

- name: Publish packages
run: dotnet nuget push **/*.nupkg -k ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

0 comments on commit 3bc416e

Please sign in to comment.