Skip to content

fixes for building nuget in main branch #7

fixes for building nuget in main branch

fixes for building nuget in main branch #7

Workflow file for this run

name: CI
on:
push:
tags:
- '*.*.*'
jobs:
linux-x64:
runs-on: ubuntu-latest
env:
TARGET_OS: linux
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Build
run: make build-linux
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: linux-x64
path: ./build/${{ env.TARGET_OS }}/*.so
win-x64:
runs-on: ubuntu-latest
env:
TARGET_OS: win
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Install cmake & MinGW
run: sudo apt-get update && sudo apt-get -y install cmake && sudo apt-get -y install gcc-mingw-w64-x86-64
- name: Build
run: make build-win
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: win-x64
path: ./build/${{ env.TARGET_OS }}/*.dll
macos:
runs-on: macos-latest
env:
TARGET_OS: macos
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Build
run: make build-macos
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: mac-x64
path: ./build/${{ env.TARGET_OS }}/*.dylib
build_nuget:
runs-on: ubuntu-latest
needs: [linux-x64, win-x64, macos]
env:
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
NUGET_KEY: ${{ secrets.NUGET_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '5.0.100'
- uses: actions/download-artifact@v4
with:
name: linux-x64
path: ./linux-x64
- uses: actions/download-artifact@v4
with:
name: mac-x64
path: ./mac-x64
- uses: actions/download-artifact@v4
with:
name: win-x64
path: ./win-x64
- name: Extract version from tag
id: extract_tag
run: echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build nuget
run: make build-nugets
- name: Publish nugets
run: make publish-nugets