Skip to content

Build artifacts

Build artifacts #34

Workflow file for this run

name: Build artifacts
# ==== NOTE: do not rename this yml file or the run_number will be reset ====
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Use .NET Core SDK
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
source-url: https://nuget.pkg.github.com/${{ github.actor }}/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
run: dotnet restore
- name: Build solution [Release]
run: dotnet build --no-restore -c Release -p:VersionSuffix=$GITHUB_RUN_NUMBER
- name: Pack solution [Release]
run: dotnet pack --no-restore --no-build -c Release -p:VersionSuffix=$GITHUB_RUN_NUMBER -o out
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: Nuget packages
path: |
out/*
- name: Publish Nuget packages to GitHub registry
run: dotnet nuget push "out/*" -k ${{secrets.GITHUB_TOKEN}}
builddocs:
runs-on: windows-latest
steps:
- name: Checkout source
uses: actions/checkout@v6
- name: Setup .NET Core SDKs
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
with:
msbuild-architecture: x64
- name: Install SHFB
uses: Shane32/setup-SHFB@ffe9d55917ef7f63203c35528d53844409a1a502
with:
version: 2022.8.14.1
- name: Build project
run: dotnet build -c Release
- name: Build documentation
working-directory: Doc
run: msbuild EPPlusDoc.sln -t:rebuild -verbosity:minimal -property:Configuration=Release
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: Documentation
path: Doc/Help