Restore ILLink #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET | |
on: | |
create: | |
tags: [ 'v*.*.*' ] | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
permissions: | |
contents: write | |
env: | |
CONFIGURATION: Release | |
DOTNET_VERSION: 7.0.x | |
jobs: | |
dotnet: | |
name: .NET | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Setup Quill | |
run: curl -sSfL https://raw.githubusercontent.com/anchore/quill/main/install.sh | sh -s -- -b /usr/local/bin | |
- name: Setup Release | |
if: github.event_name == 'create' && github.event.ref_type == 'tag' | |
run: echo "RELEASE_NAME=${GITHUB_REPOSITORY#*/} ${GITHUB_REF_NAME}" >> $GITHUB_ENV | |
- name: Restore | |
run: dotnet restore /p:PublishTrimmed=true | |
- name: Test | |
run: dotnet test --configuration "$CONFIGURATION" --no-restore --verbosity normal | |
- name: Publish linux-arm64 | |
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime linux-arm64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial | |
- name: Publish linux-x64 | |
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime linux-x64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial | |
- name: Publish osx-arm64 | |
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime osx-arm64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial | |
- name: Publish osx-x64 | |
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime osx-x64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial | |
- name: Publish win-arm64 | |
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime win-arm64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial | |
- name: Publish win-x64 | |
run: dotnet publish --configuration "$CONFIGURATION" --no-restore --runtime win-x64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true /p:SuppressTrimAnalysisWarnings=true /p:TrimMode=partial | |
- name: Release | |
if: github.event_name == 'create' && github.event.ref_type == 'tag' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ./dist/* | |
generate_release_notes: true | |
name: ${{ env.RELEASE_NAME }} |