Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jandini committed Oct 6, 2023
0 parents commit 53d94af
Show file tree
Hide file tree
Showing 10 changed files with 542 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,43 @@
name: Build

env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
NUGET_AUTH_TOKEN: ${{ secrets.PACKAGE_REGISTRY_TOKEN }}

on:
push:
branches: '*'
pull_request:
branches: 'main'

defaults:
run:
working-directory: src

jobs:
build:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json

- name: Restore
run: dotnet restore

- name: Pack
run: dotnet pack --no-restore -c:Release

- name: Push
# Push packages into private github repository
if: github.ref == 'refs/heads/main'
run: dotnet nuget push "../bin/Release/*.nupkg" -k ${{ secrets.PACKAGE_REGISTRY_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate
38 changes: 38 additions & 0 deletions .github/workflows/nuget.yml
@@ -0,0 +1,38 @@
name: NuGet

on:
push:
tags: '*'

env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
NUGET_AUTH_TOKEN: ${{ secrets.PACKAGE_REGISTRY_TOKEN }}

defaults:
run:
working-directory: src

jobs:
nuget:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json

- name: Restore
run: dotnet restore

- name: Pack
run: dotnet pack --no-restore -c:Release

- name: Push
run: dotnet nuget push "../bin/Release/*.nupkg" -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate

0 comments on commit 53d94af

Please sign in to comment.