Skip to content

Merge pull request #34 from psavva/merge-upstream #142

Merge pull request #34 from psavva/merge-upstream

Merge pull request #34 from psavva/merge-upstream #142

Workflow file for this run

name: Build
on:
push:
branches:
- master
# repository_dispatch:
# types: [build]
workflow_dispatch:
jobs:
buildAndUnitTest:
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest ]
fail-fast: false
runs-on: ${{ matrix.os }}
env:
SOLUTION_PATH: 'src/Blockcore.sln'
BUILD_CONFIGURATION: 'Release'
steps:
- uses: actions/checkout@v2
name: Checkout
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
8.0.x
- name: Setup Node.js (16.x)
uses: actions/setup-node@v1
with:
node-version: 18
- name: Variables
run: |
echo VERSION=$(npm run version --silent) >> $GITHUB_ENV
shell: bash
- name: Unit Test
run: |
dotnet nuget locals all --clear
dotnet test -v=normal --filter "FullyQualifiedName!~IntegrationTests&Unstable!=True" -c ${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_PATH}}
- name: Nuget Pack
run: dotnet pack --configuration ${{env.BUILD_CONFIGURATION}} --output "${{github.workspace}}/package/" ${{env.SOLUTION_PATH}}
- uses: actions/upload-artifact@v2
with:
name: Blockcore-${{env.VERSION}}-${{matrix.os}}-preview
path: "${{github.workspace}}/package/"
- name: Release
if: matrix.os == 'ubuntu-latest'
uses: sondreb/action-release@main
with:
commit: 'master'
token: ${{ secrets.GITHUB_TOKEN }}
folder: "${{github.workspace}}/package/"
draft: true
prerelease: false
body: ''
name: "Blockcore ${{env.VERSION}}"
tag: ${{env.VERSION}}