Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub workflows instead of AppVeyor
Fixing keys
- Loading branch information
Showing
16 changed files
with
153 additions
and
1,137 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build and Test | ||
run: ./Build.ps1 | ||
shell: pwsh | ||
- name: Push to MyGet | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
env: | ||
NUGET_URL: https://www.myget.org/F/automapperdev/api/v3/index.json | ||
NUGET_API_KEY: ${{ secrets.MYGET_CI_API_KEY }} | ||
run: ./Push.ps1 | ||
shell: pwsh | ||
- name: Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: artifacts/**/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build and Test | ||
run: ./Build.ps1 | ||
shell: pwsh | ||
- name: Push to MyGet | ||
env: | ||
NUGET_URL: https://www.myget.org/F/automapperdev/api/v3/index.json | ||
NUGET_API_KEY: ${{ secrets.MYGET_CI_API_KEY }} | ||
run: ./Push.ps1 | ||
shell: pwsh | ||
- name: Push to NuGet | ||
env: | ||
NUGET_URL: https://api.nuget.org/v3/index.json | ||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | ||
run: ./Push.ps1 | ||
shell: pwsh | ||
- name: Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: artifacts/**/* |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Taken from psake https://github.com/psake/psake | ||
|
||
<# | ||
.SYNOPSIS | ||
This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode | ||
to see if an error occcured. If an error is detected then an exception is thrown. | ||
This function allows you to run command-line programs without having to | ||
explicitly check the $lastexitcode variable. | ||
.EXAMPLE | ||
exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed" | ||
#> | ||
function Exec | ||
{ | ||
[CmdletBinding()] | ||
param( | ||
[Parameter(Position=0,Mandatory=1)][scriptblock]$cmd, | ||
[Parameter(Position=1,Mandatory=0)][string]$errorMessage = ($msgs.error_bad_command -f $cmd) | ||
) | ||
& $cmd | ||
if ($lastexitcode -ne 0) { | ||
throw ("Exec: " + $errorMessage) | ||
} | ||
} | ||
|
||
$artifacts = ".\artifacts" | ||
|
||
if(Test-Path $artifacts) { Remove-Item $artifacts -Force -Recurse } | ||
|
||
exec { & dotnet clean -c Release } | ||
|
||
exec { & dotnet build -c Release } | ||
|
||
exec { & dotnet test -c Release -r $artifacts --no-build -l trx --verbosity=normal } | ||
|
||
exec { & dotnet pack .\src\AutoMapper\AutoMapper.csproj -c Release -o $artifacts --no-build } | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<VersionPrefix>10.0.0</VersionPrefix> | ||
<Authors>Jimmy Bogard</Authors> | ||
<LangVersion>latest</LangVersion> | ||
<WarningsAsErrors>true</WarningsAsErrors> | ||
<NoWarn>$(NoWarn);1701;1702;1591</NoWarn> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<Authors>Jimmy Bogard</Authors> | ||
<LangVersion>latest</LangVersion> | ||
<NoWarn>$(NoWarn);CS1701;CS1702;CS1591</NoWarn> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<Features>strict</Features> | ||
</PropertyGroup> | ||
|
||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$scriptName = $MyInvocation.MyCommand.Name | ||
$artifacts = "./artifacts" | ||
|
||
if ([string]::IsNullOrEmpty($Env:NUGET_API_KEY)) { | ||
Write-Host "${scriptName}: NUGET_API_KEY is empty or not set. Skipped pushing package(s)." | ||
} else { | ||
Get-ChildItem $artifacts -Filter "*.nupkg" | ForEach-Object { | ||
Write-Host "$($scriptName): Pushing $($_.Name)" | ||
dotnet nuget push $_ --source $Env:NUGET_URL --api-key $Env:NUGET_API_KEY | ||
if ($lastexitcode -ne 0) { | ||
throw ("Exec: " + $errorMessage) | ||
} | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
1 comment
on commit 314671c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbogard App Voyer API key doesn't work anymore. Do I just need to follow these changed and it should work with Github actions?
I take it this is intentional to allow people to try a PR using the MyGet build. With AppVeyor, I think the publish to MyGet happened only when merging into master.