Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Tuerk committed Dec 11, 2023
1 parent b109dfc commit c8220d9
Showing 1 changed file with 59 additions and 34 deletions.
93 changes: 59 additions & 34 deletions .github/workflows/publish-nuget.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,66 @@
name: CI

on:
push:
branches:
- setup-cicd-pipeline
pull_request:
branches:
- setup-cicd-pipeline
push:
branches:
- setup-cicd-pipeline
pull_request:
branches:
- setup-cicd-pipeline


env:
MAJOR: 0
MINOR: 1
PATCH: 0
APP_VERSION: v$(MAJOR).$(MINOR).$(PATCH)
BUILD_CONFIG: 'Release'
SOLUTION: 'src/Hyperledger.Aries.sln'
#IS_PULL_REQUEST: ${{ github.ref == 'refs/pull/.../merge' }}
IS_MAIN_BRANCH: ${{ github.ref == 'refs/heads/main' }}
IS_DEV_BRANCH: ${{ github.ref == 'refs/heads/develop' }}
IS_RELEASE_BRANCH: ${{ github.ref == 'refs/heads/release' }}

jobs:
build:

env:
BUILD_CONFIG: 'Release'
SOLUTION: 'src/Hyperledger.Aries.sln'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup NuGet
uses: NuGet/[email protected]

- name: Restore dependencies
run: nuget restore $SOLUTION

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x

- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore

#- name: Run tests
#run: dotnet test /p:Configuration=$env:BUILD_CONFIG --no-restore --no-build --verbosity normal
# build_number:
# name: Set Build Number
#
# runs-on: ubuntu-latest
#
# steps:
# - name: Check bats version
# run: bats --version

build:
name: Build
needs: build_number

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup NuGet
uses: NuGet/setup-nuget@v1

#- name: Publish
#run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
- name: Configure NuGet sources
run: |
nuget sources add -name SD-JWT -source https://pkgs.dev.azure.com/mi-lissi/OID4VC/_packaging/lissi-oid4vc/nuget/v3/index.json
- name: Restore dependencies
run: nuget restore $SOLUTION

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x

- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore

#- name: Run tests
#run: dotnet test /p:Configuration=$env:BUILD_CONFIG --no-restore --no-build --verbosity normal

#- name: Publish
#run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}

0 comments on commit c8220d9

Please sign in to comment.