Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled pushing releases to github packages #2

Merged
merged 1 commit into from
Apr 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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