Skip to content

Merge pull request #47 from onitake/test-artifacts #8

Merge pull request #47 from onitake/test-artifacts

Merge pull request #47 from onitake/test-artifacts #8

Workflow file for this run

name: Release
on:
push:
tags: [ "*" ]
permissions:
contents: read
jobs:
test:
name: Test (Release Go)
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Test
run: make DOCKER=docker release-test
build:
name: Release Build
runs-on: ubuntu-latest
permissions:
# for uploading artifacts
actions: write
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build
run: make DOCKER=docker release
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: restreamer
path: |
restreamer-*
SHA256SUMS
if-no-files-found: warn
retention-days: 1
release:
name: Release Tag
runs-on: ubuntu-latest
needs: [ build, test ]
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: restreamer
- name: List artifacts
run: ls -lR
- name: Verify checksums
run: sha256sum -c SHA256SUMS
- name: Construct release version
id: release_version
# remove the leading v (if present) and match the relaxed SemVer part
run: |
export release_version=$(echo ${{ github.ref_name }} | sed -E 's/^v?(([0-9]+.)*[0-9]+)/\1/')
echo "version=${release_version}" >> "${GITHUB_OUTPUT}"
- name: Create GitHub release
uses: swisstxt/github-action-release-artifacts@v1
with:
tag: ${{ github.ref_name }}
create_release: true
release_name: ${{ steps.release_version.outputs.version }}