Skip to content

Artifacts publish

Artifacts publish #55

Workflow file for this run

name: Artifacts publish
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
# Artifacts from rc/** (release candidates) branches will be published on package feeds
# This branches can contain release candidates, preview and other pre-release packages
# While master branch will contain only stable releases
# Also, I want to consider finding a proper name for such branches
on:
workflow_run:
workflows: ["CI Build"]
branches:
- 'master'
- 'rc/**'
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
workflow_conclusion: success
branch: ${{ github.event.workflow_run.head_branch }}
name: nupkg
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Enable globstar
run: |
shopt -s globstar
- name: Publish to Nuget
run: |
dotnet nuget push **/*.nupkg --api-key ${{secrets.NUGET_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish to GitHub Packages
run: |
dotnet nuget push **/*.nupkg --api-key ${{secrets.GITHUB_TOKEN}} --source https://nuget.pkg.github.com/AvaloniaUtils/index.json --skip-duplicate