Skip to content

build(deps): Bump Microsoft.Build.Utilities.Core from 17.8.3 to 17.9.5 #86

build(deps): Bump Microsoft.Build.Utilities.Core from 17.8.3 to 17.9.5

build(deps): Bump Microsoft.Build.Utilities.Core from 17.8.3 to 17.9.5 #86

Workflow file for this run

name: CI
on:
create:
branches:
- release/**
push:
branches:
- master
- dev/**
pull_request:
branches:
- master
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
build:
env:
BUILD_CONFIG: 'Release'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.10.2
with:
versionSpec: '5.x'
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.10.2
- name: Setup NuGet
uses: NuGet/setup-nuget@v1.2.0
- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Restore tools
run: dotnet tool restore
- name: Install build dependencies
run: sudo apt install -y git cmake ninja-build
- name: Build .NET rootfs
run: |
git clone --depth=1 https://github.com/dotnet/arcade
export ROOTFS_DIR=${{ github.workspace }}/rootfs
arcade/eng/common/cross/build-rootfs.sh x64 haiku
- name: Determine LLVM build ID
id: llvm-build-id
run: |
echo "id=$(cc -dumpversion)-$(cat external/CppSharp/build/llvm/LLVM-commit)" >> "$GITHUB_OUTPUT"
- name: Fetch cached LLVM build
uses: actions/cache@v3
with:
path: external/CppSharp/build/llvm/**
key: ${{ steps.llvm-build-id.outputs.id }}
- name: Build and install workload
run: |
export ROOTFS_DIR=${{ github.workspace }}/rootfs
dotnet cake build.cake --target=InstallWorkload --configuration=${{ env.BUILD_CONFIG }} --build-version=${{ steps.gitversion.outputs.majorMinorPatch }} --package-version=${{ steps.gitversion.outputs.semVer }}
- name: Publish nuget artifacts
uses: actions/upload-artifact@v2
with:
name: packages.${{ steps.gitversion.outputs.semVer }}
path: out/nuget/**
- name: Publish on GitHub
if: ${{ github.ref == 'refs/heads/master' }}
run: |
dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
dotnet nuget push out/nuget/** --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
- name: Create prerelease
if: ${{ github.ref == 'refs/heads/master' }}
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ steps.gitversion.outputs.semVer }}
prerelease: true
title: .NET workload for Haiku ${{ steps.gitversion.outputs.semVer }}
files: |
${{ github.workspace }}/out/nuget/*
# Clean up unnecessary files to prevent them from being cached
- name: Clean up LLVM
run: |
rm -rf external/CppSharp/build/llvm/llvm-project
# - name: Publish dev
# if: github.ref == 'refs/heads/master'
# run: nuget push .nupkgs\** -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
# - name: Publish
# if: startsWith(github.ref, 'refs/heads/release')
# run: nuget push .nupkgs\** -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}