iced/.github/workflows/build.yml

49 lines
1.5 KiB
YAML
Raw Normal View History

2019-09-24 23:22:36 +00:00
name: GitHub CI
2019-09-25 17:56:12 +00:00
on: push
2019-09-24 23:22:36 +00:00
jobs:
build:
name: Build
runs-on: windows-latest
2019-10-03 16:04:21 +00:00
2019-09-24 23:22:36 +00:00
steps:
- uses: actions/checkout@v1
- name: Build, test
2019-10-04 16:28:14 +00:00
shell: pwsh
2019-09-24 23:22:36 +00:00
run: |
2019-10-04 16:28:14 +00:00
$env:PATH = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64;' + $env:PATH
.\build.ps1
2019-09-24 23:22:36 +00:00
- name: upload-artifact doesn't support wildcards
2019-10-04 16:28:14 +00:00
shell: pwsh
2019-09-24 23:22:36 +00:00
run: |
2019-10-04 16:28:14 +00:00
New-Item -ItemType Directory nuget_files > $null
Copy-Item Iced\bin\Release\*.*nupkg nuget_files
2019-09-24 23:22:36 +00:00
- uses: actions/upload-artifact@v1
with:
name: nupkg
path: nuget_files
2019-09-25 17:56:12 +00:00
2019-10-05 15:57:58 +00:00
- uses: actions/upload-artifact@v1
with:
name: coverage.info
path: Iced.UnitTests/coverage.info
2019-10-05 13:52:24 +00:00
- name: Upload coverage report
shell: bash
run: |
curl https://codecov.io/bash -o codecov
chmod +x codecov
./codecov -f Iced.UnitTests/coverage.info
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
2019-09-25 17:56:12 +00:00
- name: Upload to nuget.org if it's a new release
if: startsWith(github.ref, 'refs/tags/')
shell: pwsh
run: |
2019-10-03 16:04:21 +00:00
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 }