Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Redth committed Mar 12, 2020
2 parents 7a8fdb9 + 9506a7b commit 40aeac4
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Expand Up @@ -10,30 +10,30 @@ jobs:
name: Build
env:
NUPKG_MAJOR: 3.0
runs-on: macos-latest
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Define CI Version
run: echo ::set-env name=NUPKG_VER::$NUPKG_MAJOR-pre$GITHUB_RUN_ID
- name: Define Release Version
if: github.event_name == 'release'
run: echo ::set-env name=NUPKG_VER::${GITHUB_REF/refs\/tags\//}
- name: Setup Environment
run: mkdir ./artifacts
- name: NuGet Restore ZXing.Net.Mobile
run: msbuild /t:Restore /p:Configuration=Release ./ZXing.Net.Mobile.sln
- name: Build ZXing.Net.Mobile
run: msbuild /t:Build /p:Configuration=Release ./ZXing.Net.Mobile.sln
- name: NuGet Pack ZXing.Net.Mobile
run: msbuild /t:Pack /p:Configuration=Release /p:PackageOutputPath=../artifacts /p:PackageVersion=$NUPKG_VER /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg ./ZXing.Net.Mobile/ZXing.Net.Mobile.csproj
- name: NuGet Pack ZXing.Net.Mobile.Forms
run: msbuild /t:Pack /p:Configuration=Release /p:PackageOutputPath=../artifacts /p:PackageVersion=$NUPKG_VER /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg ./ZXing.Net.Mobile.Forms/ZXing.Net.Mobile.Forms.csproj
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.0
- name: NuGet Restore
run: msbuild /t:Restore /p:Configuration=Release .\ZXing.Net.Mobile.sln
- name: Build
run: msbuild /t:Build /p:Configuration=Release .\ZXing.Net.Mobile.sln
- name: Package NuGets
run: |
$pkgVer = ($env:NUPKG_MAJOR + "-alpha" + $env:GITHUB_RUN_ID)
if ($env:GITHUB_EVENT_NAME -eq "release") {
$pkgVer = $env:GITHUB_REF.Substring($env:GITHUB_REF.LastIndexOf('/') + 1)
}
New-Item -ItemType Directory -Force -Path .\artifacts
msbuild /t:Pack /p:Configuration=Release /p:PackageOutputPath=..\artifacts /p:PackageVersion=$pkgVer /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg .\ZXing.Net.Mobile\ZXing.Net.Mobile.csproj
msbuild /t:Pack /p:Configuration=Release /p:PackageOutputPath=..\artifacts /p:PackageVersion=$pkgVer /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg .\ZXing.Net.Mobile.Forms\ZXing.Net.Mobile.Forms.csproj
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: NuGet
path: ./artifacts
path: .\artifacts

publish-gh:
name: Publish to GitHub Packages
Expand Down

0 comments on commit 40aeac4

Please sign in to comment.