Skip to content

feat: cs gen, fix related examples #25

feat: cs gen, fix related examples

feat: cs gen, fix related examples #25

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
rid: linux-x64
artifact: nativegen-linux-x64
- os: windows-latest
rid: win-x64
artifact: nativegen-win-x64.exe
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
dotnet-quality: 'preview'
- name: Restore dependencies
run: dotnet restore NativeCodeGen.sln
- name: Publish
run: dotnet publish src/NativeCodeGen.Cli/NativeCodeGen.Cli.csproj -c Release -r ${{ matrix.rid }} -o ./publish
- name: Rename artifact (Unix)
if: runner.os != 'Windows'
run: |
mv ./publish/nativegen ./publish/${{ matrix.artifact }}
chmod +x ./publish/${{ matrix.artifact }}
- name: Rename artifact (Windows)
if: runner.os == 'Windows'
run: move .\publish\nativegen.exe .\publish\${{ matrix.artifact }}
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
files: ./publish/${{ matrix.artifact }}
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref, '-') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-musl:
runs-on: ubuntu-latest
container: mcr.microsoft.com/dotnet/sdk:10.0-preview-alpine
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: apk add --no-cache clang build-base zlib-dev
- name: Restore dependencies
run: dotnet restore NativeCodeGen.sln
- name: Publish
run: dotnet publish src/NativeCodeGen.Cli/NativeCodeGen.Cli.csproj -c Release -r linux-musl-x64 -o ./publish
- name: Rename artifact
run: |
mv ./publish/nativegen ./publish/nativegen-linux-musl-x64
chmod +x ./publish/nativegen-linux-musl-x64
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
files: ./publish/nativegen-linux-musl-x64
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref, '-') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}