Skip to content

[deps]: Update gh minor #270

[deps]: Update gh minor

[deps]: Update gh minor #270

Workflow file for this run

name: Build
on:
pull_request:
push:
workflow_dispatch:
jobs:
build-self-contained:
name: Build Self Contained Artifacts
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- rid: win-x64
- rid: win-x86
- rid: win-arm64
- rid: linux-x64
- rid: linux-arm
- rid: linux-arm64
- rid: linux-musl-x64
- rid: linux-musl-arm64
- rid: osx-x64
- rid: osx-arm64
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Print environment
run: |
dotnet --info
echo "GitHub ref: $GITHUB_REF"
echo "GitHub ref name: $GITHUB_REF_NAME"
echo "GitHub event: $GITHUB_EVENT_NAME"
- name: Restore/Clean service
run: |
echo "Restore"
dotnet restore
echo "Clean"
dotnet clean -c "Release"
- name: Build Self Contained Binary
env:
RID: ${{ matrix.rid }}
run: |
OUTPUT_DIR="$(pwd)/build/sc/$RID"
echo "### Building self contained binary for $RID to $OUTPUT_DIR"
dotnet publish -c Release -r $RID --self-contained true -p:PublishDir=$OUTPUT_DIR -p:PublishReadyToRun=true \
-p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false \
-p:IncludeNativeLibrariesForSelfExtract=true -p:EnableCompressionInSingleFile=true
cd $OUTPUT_DIR
FILENAME=$(ls hbs*)
SUFFIX=${FILENAME#hbs}
NEW_FILENAME="hbs_${RID}${SUFFIX}"
mv -- "$FILENAME" "$NEW_FILENAME"
zip -j hbs_${RID}.zip $NEW_FILENAME
rm $NEW_FILENAME
- name: Upload Self Contained artifact (${{ matrix.rid }})
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: hbs_${{ matrix.rid }}
path: build/sc/${{ matrix.rid }}
if-no-files-found: error
- name: Build Framework Dependent Binary
env:
RID: ${{ matrix.rid }}
run: |
OUTPUT_DIR="$(pwd)/build/fd/$RID"
echo "### Building framework dependent binary for $RID to $OUTPUT_DIR"
dotnet publish -c Release -r $RID --self-contained false -p:PublishDir=$OUTPUT_DIR -p:PublishSingleFile=true \
-p:DebugType=None -p:DebugSymbols=false -p:IncludeNativeLibrariesForSelfExtract=true
cd $OUTPUT_DIR
FILENAME=$(ls hbs*)
SUFFIX=${FILENAME#hbs}
NEW_FILENAME="hbs_${RID}_dotnet${SUFFIX}"
mv -- "$FILENAME" "$NEW_FILENAME"
zip -j hbs_${RID}_dotnet.zip $NEW_FILENAME
rm $NEW_FILENAME
- name: Upload Framework Dependent artifact (${{ matrix.rid }})
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: hbs_${{ matrix.rid }}_dotnet
path: build/fd/${{ matrix.rid }}
if-no-files-found: error