Release to GitHub Packages #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release to GitHub Packages | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v1 | |
- name: Build | |
run: dotnet build -c Release | |
- name: Test | |
run: dotnet test -c Release --no-build | |
- name: Pack nugets | |
run: dotnet pack -c Release --no-build --output . | |
- name: GitHub auth | |
run: dotnet nuget add source --username USERNAME --password ${{ secrets.HUB_API_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Zt-freak/index.json" | |
- name: Push to GitHub Packages | |
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.HUB_API_TOKEN}} --source "github" |