Skip to content

Commit

Permalink
Prepared repository to build release
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeuchler committed Nov 13, 2020
1 parent ad9df9a commit b10b0d9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .build/BuildToolkit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ function Invoke-Publish {

foreach ($package in $packages) {
Write-Host "Pushing package $package"
& $global:NugetCli push $package $env:MORYX_NUGET_APIKEY -Source $env:MORYX_PACKAGE_TARGET -Verbosity $env:MORYX_NUGET_VERBOSITY
& $global:NugetCli push $package $env:MORYX_NUGET_APIKEY -Source $env:MORYX_PACKAGE_TARGET -Verbosity $env:MORYX_NUGET_VERBOSITY -NoSymbols
Invoke-ExitCodeCheck $LastExitCode;
}

Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: CI

# Controls when the action will run. Triggers the workflow on push or pull request

on:
push:
branches:
- dev
tags:
- v[0-9]+.[0-9]+.[0-9]+ # Matches all semantic versioning tags with major, minor, patch
pull_request:
branches:
- dev
Expand All @@ -14,9 +15,6 @@ env:
MORYX_OPTIMIZE_CODE: "false"
MORYX_BUILD_CONFIG: "Release"
MORYX_BUILDNUMBER: ${{github.run_number}}
MORYX_NUGET_APIKEY: ${{secrets.MYGET_TOKEN}}
MORYX_PACKAGE_TARGET: "https://www.myget.org/F/moryx/api/v2/package"
MORYX_PACKAGE_TARGET_V3: "https://www.myget.org/F/moryx/api/v3/index.json"

jobs:
Build:
Expand Down Expand Up @@ -83,6 +81,20 @@ jobs:
name: packages
path: artifacts/Packages/

- name: Publish packages
- name: Publish on MyGet
if: ${{ startsWith(github.ref, 'refs/heads/') }} # Normal branches are published to myget
shell: pwsh
env:
MORYX_NUGET_APIKEY: ${{secrets.MYGET_TOKEN}}
MORYX_PACKAGE_TARGET: "https://www.myget.org/F/moryx/api/v2/package"
MORYX_PACKAGE_TARGET_V3: "https://www.myget.org/F/moryx/api/v3/index.json"
run: ./Build.ps1 -Publish

- name: Publish on NuGet
if: ${{ startsWith(github.ref, 'refs/tags/v') }} # Version Tags are published to nuget
shell: pwsh
env:
MORYX_NUGET_APIKEY: ${{secrets.NUGET_TOKEN}}
MORYX_PACKAGE_TARGET: "https://api.nuget.org/v3/index.json"
MORYX_PACKAGE_TARGET_V3: "https://api.nuget.org/v3/index.json"
run: ./Build.ps1 -Publish
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>

<PropertyGroup>
<MoryxPlatformVersion>3.0.0-dev.223</MoryxPlatformVersion>
<MoryxPlatformVersion>3.0.0</MoryxPlatformVersion>
</PropertyGroup>

<Import Project=".build\Common.props" Condition="'$(CreatePackage)' == 'true'" />
Expand Down

0 comments on commit b10b0d9

Please sign in to comment.