Skip to content

Commit

Permalink
Enabled pushing releases to github packages (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorhn authored Apr 6, 2021
1 parent 67a391a commit e9b6a54
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
# - name: Check PR labels action step
# id: labelcheck
# uses: shioyang/[email protected]
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# labels: '["create-release"]'
# - name: Continue only if the create-release label exists, fail otherwise.
# if: steps.labelcheck.outputs.result != 'true'
# run: exit 1
- name: Check PR labels action step
id: labelcheck
uses: shioyang/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
labels: '["create-release"]'
- name: Continue only if the create-release label exists, fail otherwise.
if: steps.labelcheck.outputs.result != 'true'
run: exit 1
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Avoid shallow clone so nbgv can do its work.
Expand All @@ -36,38 +36,38 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
tag: v${{ steps.nbgv.outputs.SimpleVersion }}
# - name: Build changelog
# id: build_changelog
# uses: mikepenz/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# failOnError: true
# configuration: "configs/configuration.json"
# toTag: v${{ steps.nbgv.outputs.SimpleVersion }}
- name: Build changelog
id: build_changelog
uses: mikepenz/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
failOnError: true
configuration: "configs/configuration.json"
toTag: v${{ steps.nbgv.outputs.SimpleVersion }}
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: 5.0.x # SDK Version to use.
source-url: https://nuget.pkg.github.com/data-automation-framework/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB }}
# - name: Build project
# run: dotnet build --configuration Release
# - name: Create the nuget package
# run: dotnet pack Daf.Core.Adf/Daf.Core.Adf.csproj --configuration Release --output Daf.Core.Adf/bin/Release/Publish
# - name: Publish to GitHub
# run: dotnet nuget push Daf.Core.Adf/bin/Release/Publish/**/*.nupkg --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }}
# - name: Create release
# uses: softprops/action-gh-release@v1
# with:
# name: ${{ steps.nbgv.outputs.SimpleVersion }}
# tag_name: v${{ steps.nbgv.outputs.SimpleVersion }}
# body: ${{steps.build_changelog.outputs.changelog}}
# draft: false
# prerelease: false
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB }}
- name: Build project
run: dotnet build --configuration Release
- name: Create the nuget package
run: dotnet pack Daf.Core.Adf/Daf.Core.Adf.csproj --configuration Release --output Daf.Core.Adf/bin/Release/Publish
- name: Publish to GitHub
run: dotnet nuget push Daf.Core.Adf/bin/Release/Publish/**/*.nupkg --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }}
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.nbgv.outputs.SimpleVersion }}
tag_name: v${{ steps.nbgv.outputs.SimpleVersion }}
body: ${{steps.build_changelog.outputs.changelog}}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB }}
- name: Move latest MajorMinor version tag
uses: EndBug/[email protected]
with:
Expand All @@ -76,9 +76,9 @@ jobs:
uses: EndBug/[email protected]
with:
tag-name: v${{ steps.nbgv.outputs.VersionMajor }}
# - name: Repository dispatch
# uses: peter-evans/[email protected]
# with:
# token: ${{ secrets.GITHUB }}
# repository: data-automation-framework/docs
# event-type: deploy-pages
- name: Repository dispatch
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB }}
repository: data-automation-framework/docs
event-type: deploy-pages

0 comments on commit e9b6a54

Please sign in to comment.