Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyparrish committed Jun 17, 2024
1 parent cff1a50 commit d4ef15e
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build-emulators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build Emulators

on:
push: # Trigger for pushes.
branches:
- main
paths:
- emulator-patches/**
- player/**
Expand All @@ -11,8 +13,14 @@ on:
workflow_dispatch: # Allows for manual triggering.
inputs:
ref:
description: "The ref to build and test."
description: "The ref to build."
required: false
workflow_call: # Allows for another workflow to call this one.
inputs:
ref:
description: "The ref to build."
required: true
type: string

# If another instance of this workflow is started for the same PR, cancel the
# old one. If a PR is updated and a new test run is started, the old test run
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/build-firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build Firmware

on:
push: # Trigger for pushes.
branches:
- main
paths:
- hardware/firmware/**
- .github/workflows/build-firmware.yaml
Expand All @@ -10,8 +12,14 @@ on:
workflow_dispatch: # Allows for manual triggering.
inputs:
ref:
description: "The ref to build and test."
description: "The ref to build."
required: false
workflow_call: # Allows for another workflow to call this one.
inputs:
ref:
description: "The ref to build."
required: true
type: string

# If another instance of this workflow is started for the same PR, cancel the
# old one. If a PR is updated and a new test run is started, the old test run
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/build-hardware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build Hardware

on:
push: # Trigger for pushes.
branches:
- main
paths:
- hardware/**
- '!hardware/firmware/**'
Expand All @@ -11,8 +13,14 @@ on:
workflow_dispatch: # Allows for manual triggering.
inputs:
ref:
description: "The ref to build and test."
description: "The ref to build."
required: false
workflow_call: # Allows for another workflow to call this one.
inputs:
ref:
description: "The ref to build."
required: true
type: string

# If another instance of this workflow is started for the same PR, cancel the
# old one. If a PR is updated and a new test run is started, the old test run
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/build-software.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build Software

on:
push: # Trigger for pushes.
branches:
- main
paths:
- embed-video-in-rom/**
- encoder/**
Expand All @@ -13,8 +15,14 @@ on:
workflow_dispatch: # Allows for manual triggering.
inputs:
ref:
description: "The ref to build and test."
description: "The ref to build."
required: false
workflow_call: # Allows for another workflow to call this one.
inputs:
ref:
description: "The ref to build."
required: true
type: string

# If another instance of this workflow is started for the same PR, cancel the
# old one. If a PR is updated and a new test run is started, the old test run
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Release

on:
push: # Trigger on new version tags
tag:
- v[0-9]+.[0-9]+.[0-9]+

# If another instance of this workflow is started for the same PR, cancel the
# old one. If a PR is updated and a new test run is started, the old test run
# will be cancelled automatically to conserve resources.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
software:
uses: joeyparrish/kinetoscope/.github/workflows/build-software.yaml@main
with:
ref: ${{ github.ref }}

firmware:
uses: joeyparrish/kinetoscope/.github/workflows/build-firmware.yaml@main
with:
ref: ${{ github.ref }}

hardware:
uses: joeyparrish/kinetoscope/.github/workflows/build-hardware.yaml@main
with:
ref: ${{ github.ref }}

emulators:
uses: joeyparrish/kinetoscope/.github/workflows/build-emulators.yaml@main
with:
ref: ${{ github.ref }}

release:
needs:
- software
- firmware
- hardware
- emulators

name: Compile Release
runs-on: ubuntu-latest
steps:
- name: Pull software
uses: actions/download-artifact@v4
with:
name: streamer-rom

- name: Pull firmware
uses: actions/download-artifact@v4
with:
name: firmware

- name: Pull hardware
uses: actions/download-artifact@v4
with:
name: fab

- name: Pull blastem
uses: actions/download-artifact@v4
with:
name: blastem

- name: Arrange release artifacts
run: |
ls -lR

0 comments on commit d4ef15e

Please sign in to comment.