Kyoo/.github/workflows/release.yml
2021-08-14 20:42:20 +02:00

51 lines
1.6 KiB
YAML

name: Release
on:
create:
tags:
- v*
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set commit environment
run: echo "COMMIT_SHA=$(git rev-list -n 1 ${{github.ref}})" >> $GITHUB_ENV
- name: Wait for builds & tests to finish
uses: lewagon/wait-on-check-action@master
with:
ref: ${{github.ref}}
repo-token: ${{secrets.GITHUB_TOKEN}}
running-workflow-name: release
allowed-conclusions: success,skipped,cancelled,neutral
- name: Generate changelog
uses: mikepenz/release-changelog-builder-action@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
with:
commit: ${{env.COMMIT_SHA}}
workflow: build.yml
path: ./artifacts
github_token: ${{secrets.GITHUB_TOKEN}}
- name: Public the abstractions to nuget
id: publish_nuget
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: Kyoo.Abstractions/Kyoo.Abstractions.csproj
PACKAGE_NAME: Kyoo.Abstractions
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
INCLUDE_SYMBOLS: true
- name: Create Release
uses: ncipollo/release-action@v1
with:
draft: true
release_name: ${{github.ref}}
body: ${{steps.github_release.outputs.changelog}}
artifacts: ./artifacts/**/*
token: ${{secrets.GITHUB_TOKEN}}