Skip to content

Create release on github #2782

Create release on github

Create release on github #2782

Workflow file for this run

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/[email protected]
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_branch }}
- name: Download artifacts from build stage
uses: dawidd6/action-download-artifact@v6
with:
workflow: build.yaml
run_id: ${{ github.event.workflow_run.id }}
name: release-artifacts-.*
name_is_regexp: true
path: releases/
- name: Flatten all downloaded artifacts to a single directory
shell: bash
run: |
cd releases/
find . -type f -exec mv '{}' ./ \;
find . -type d -empty -delete
- 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@v2
if: ${{ steps.match-tag.outputs.match != '' }}
with:
generate_release_notes: true
tag_name: ${{ github.event.workflow_run.head_branch }}
files: |
releases/*