iced/.github/workflows/build.yml

35 lines
1.1 KiB
YAML

name: GitHub CI
on: push
jobs:
build:
name: Build
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Build, test
shell: pwsh
run: |
$env:PATH = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64;' + $env:PATH
.\build.ps1
- name: upload-artifact doesn't support wildcards
shell: pwsh
run: |
New-Item -ItemType Directory nuget_files > $null
Copy-Item Iced\bin\Release\*.*nupkg nuget_files
- uses: actions/upload-artifact@v1
with:
name: nupkg
path: nuget_files
- name: Upload to nuget.org if it's a new release
if: startsWith(github.ref, 'refs/tags/')
shell: pwsh
run: |
Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -UseBasicParsing -OutFile nuget.exe
Get-ChildItem Iced\bin\Release\Iced.*.nupkg | ForEach-Object { .\nuget.exe push $_.FullName -ApiKey ${{secrets.NUGET_APIKEY}} -NonInteractive -Source https://api.nuget.org/v3/index.json }