Skip to content

Commit

Permalink
try to trigger build
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelMunoz committed Dec 7, 2020
1 parent 88ae3e0 commit 132ea5a
Showing 1 changed file with 48 additions and 49 deletions.
97 changes: 48 additions & 49 deletions .github/workflows/dotnet-core.yml
Expand Up @@ -2,10 +2,10 @@ name: Build

on:
push:
branches: [ main ]
branches: [main]
pull_request:
types: [opened, synchronize, reopened, closed]
branches: [ main ]
branches: [main]

env:
configuration: Release
Expand All @@ -17,70 +17,69 @@ jobs:
outputs:
nbgv: ${{ steps.nbgv.outputs.SemVer2 }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: 'recursive'
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: "recursive"

- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100

- name: NBGV
id: nbgv
uses: dotnet/nbgv@master
with:
setAllVars: true
- name: NBGV
id: nbgv
uses: dotnet/nbgv@master
with:
setAllVars: true

- name: NuGet Restore
run: dotnet restore
- name: NuGet Restore
run: dotnet restore

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1

- name: Build
run: dotnet build src/Mondocks --configuration ${{ env.configuration }}
- name: Build
run: dotnet build src/Mondocks --configuration ${{ env.configuration }}

- name: Create NuGet Artifacts
uses: actions/upload-artifact@master
with:
name: nuget
path: '**/*.nupkg'
- name: Create NuGet Artifacts
uses: actions/upload-artifact@master
with:
name: nuget
path: "**/*.nupkg"

release:
runs-on: ubuntu-latest
needs: build
if: contains(github.event.pull_request.labels.*.name, 'release') && github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download NuGet Packages
uses: actions/download-artifact@v2
with:
name: nuget
- name: Download NuGet Packages
uses: actions/download-artifact@v2
with:
name: nuget

- name: Changelog
uses: glennawatson/ChangeLog@v1
id: changelog
- name: Changelog
uses: glennawatson/ChangeLog@v1
id: changelog

- name: Create Release
uses: actions/create-release@v1
env:
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
with:
tag_name: ${{ needs.build.outputs.nbgv }}
release_name: ${{ needs.build.outputs.nbgv }}
body: |
${{ steps.changelog.outputs.commitLog }}
- name: NuGet Push
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}
SOURCE_URL: https://api.nuget.org/v3/index.json
run: |
dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg
- name: NuGet Push
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}
SOURCE_URL: https://api.nuget.org/v3/index.json
run: |
dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg

0 comments on commit 132ea5a

Please sign in to comment.