Create release on github #4680
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: Create release on github | |
on: | |
workflow_run: | |
workflows: | |
- Build binaries | |
types: | |
- "completed" | |
jobs: | |
release: | |
runs-on: ubuntu-20.04 | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.workflow_run.head_branch }} | |
- uses: actions-ecosystem/action-regex-match@v2 | |
id: match-tag | |
with: | |
text: ${{ github.event.workflow_run.head_branch }} | |
regex: '^v([0-9]+\.\d+\.\d+)$' | |
- name: Download artifacts from build stage | |
if: ${{ steps.match-tag.outputs.match != '' }} | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: build.yaml | |
name: release-artifacts | |
path: releases/ | |
- name: Generate sha256 checksum and gpg signatures for release artifacts | |
if: ${{ steps.match-tag.outputs.match != '' }} | |
uses: livepeer/action-gh-checksum-and-gpg-sign@latest | |
with: | |
artifacts-dir: releases | |
release-name: ${{ github.event.workflow_run.head_branch }} | |
gpg-key: ${{ secrets.CI_GPG_SIGNING_KEY }} | |
gpg-key-passphrase: ${{ secrets.CI_GPG_SIGNING_PASSPHRASE }} | |
- name: Release to github | |
uses: softprops/action-gh-release@v1 | |
if: ${{ steps.match-tag.outputs.match != '' }} | |
with: | |
generate_release_notes: true | |
tag_name: ${{ github.event.workflow_run.head_branch }} | |
files: | | |
releases/* |