Update actions/checkout action to v4.2.2 #179
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: "Build and Pack" | |
on: | |
push: | |
branches: [ master ] | |
tags: [ v* ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore Windows | |
run: dotnet restore --runtime=win10-x64 | |
- name: Build Windows | |
run: dotnet build IdlImpTool --no-restore --runtime=win10-x64 | |
- name: Restore Linux | |
run: dotnet restore --runtime=linux-x64 | |
- name: Build Linux | |
run: dotnet build IdlImpTool --no-restore --runtime=linux-x64 | |
- name: Pack IdlImporter (also builds any runtime) | |
run: dotnet pack IDLImporter --include-symbols --no-restore -o . | |
- name: Pack IdlImpTool Everything (also builds any runtime) | |
run: dotnet pack IdlImpTool --include-symbols --no-restore -o . | |
- name: Publish Artifacts | |
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 | |
with: | |
name: NugetPackages | |
path: | | |
./*.nupkg | |
./*.snupkg | |
publish-nuget: | |
name: "Publish NuGet package" | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | |
with: | |
path: artifacts | |
- name: Publish to Nuget | |
run: dotnet nuget push artifacts/**/*.*nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.SILLSDEV_PUBLISH_NUGET_ORG}} --skip-duplicate |