Skip to content

Bump actions/checkout from 5 to 6 (#17) #67

Bump actions/checkout from 5 to 6 (#17)

Bump actions/checkout from 5 to 6 (#17) #67

Workflow file for this run

name: ProtoTreeViewBuildDeploy
on: [push, pull_request]
jobs:
check_license:
runs-on: windows-latest
steps:
- name: Setup python
uses: actions/setup-python@v6
with:
python-version: '3.x'
architecture: 'x64'
- name: Checkout repo
uses: actions/checkout@v6
with:
submodules: true
- name: Check license headers
run: python manage_license_headers.py ci
build:
runs-on: windows-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Setup Dotnet sdk
uses: actions/setup-dotnet@v5
with:
dotnet-version: 7.0.x
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2.0.0
- name: Build Windows
if: contains(matrix.os, 'windows')
run: dotnet build --configuration Release .\ProtoTreeViewExample\ProtoTreeViewExample.csproj
publish_nuget:
needs: [check_license, build]
if: startsWith(github.ref, 'refs/tags/v') # make sure deploy only runs on tags with version number
runs-on: windows-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Setup Dotnet sdk
uses: actions/setup-dotnet@v5
with:
dotnet-version: 7.0.x
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2.0.0
- name: Build Windows
run: dotnet build --configuration Release .\ProtoTreeView\ProtoTreeView.csproj
- name: Nuget Deploy
run: |
$env:RELEASE_VERSION=($env:GITHUB_REF).split("tags/v")[-1]
echo $env:RELEASE_VERSION
echo $env:GITHUB_SHA
mkdir nupkg
dotnet pack -p:PackageVersion=$env:RELEASE_VERSION -o $PWD\nupkg -p:RepositoryCommit=$env:GITHUB_SHA --configuration Release .\ProtoTreeView\ProtoTreeView.csproj
cd nupkg
dotnet nuget push "**/*.nupkg" --api-key ${{secrets.NUGET_DEPLOY_KEY}} --source "https://api.nuget.org/v3/index.json" --no-symbols true