Skip to content

Publish new release #997

Publish new release

Publish new release #997

Workflow file for this run

name: Publish new release
on:
workflow_run:
workflows:
- Build binaries
types:
- "completed"
jobs:
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: |
echo "Could not trigger a release!"
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 }}
- name: Download artifacts from build stage
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yaml
name: release-artifacts
path: releases/
- 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: 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:
tag_name: ${{ github.event.workflow_run.head_branch }}
generate_release_notes: true
files: |
releases/*