Skip to content

Commit

Permalink
Merge pull request #45 from galactic-forensics/release_workflow
Browse files Browse the repository at this point in the history
Release workflow for `v*`
  • Loading branch information
trappitsch authored Feb 9, 2024
2 parents a39948c + 63d42c8 commit ffa5745
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 107 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/controller_release.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/gui_release.yml

This file was deleted.

73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Release creation

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

env:
PYTHON_VERSION: "3.12"

jobs:
build-linux:
name: Controller and Firmware Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install the latest version of rye
uses: eifinger/setup-rye@v1
- name: Sync Rye
run: |
rye pin ${{ env.PYTHON_VERSION }}
rye sync
- name: Build the controller
run: |
cd controller
rye build --sdist
cd ..
mv dist/controller*.tar.gz dist/controller-source.tar.gz # rename the source tarball
- name: Package firmware into a tarball
run: |
cd firmware
tar -czf firmware.tar.gz *
mv firmware.tar.gz ../dist
cd ..
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
${{ github.workspace }}/dist/controller-source.tar.gz
${{ github.workspace }}/dist/firmware.tar.gz
tag_name: ${{ github.ref_name }}
name: DigOutBox ${{ github.ref_name }}
body_path: ${{ github.workspace }}/release_text.md

build-windows:
needs: build-linux
name: GUI for Windows add to Release
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Windows dependencies
run: |
choco install vcredist2010
- name: Install the latest version of rye
uses: eifinger/setup-rye@v1
- name: Sync Rye
run: |
rye pin ${{ env.PYTHON_VERSION }}
rye add fbs --dev -q --url ${{ secrets.FBS_PRO_DOWNLOAD }}
rye sync
- name: Run fbs and freeze application
run: |
cd controller_gui
rye run fbs freeze
rye run fbs installer
- name: Add to Release
uses: softprops/action-gh-release@v1
with:
files: ${{ github.workspace }}/controller_gui/target/*Setup.exe
tag_name: ${{ github.ref_name }}
3 changes: 0 additions & 3 deletions controller/release_text.md

This file was deleted.

10 changes: 0 additions & 10 deletions controller_gui/release_text.md

This file was deleted.

9 changes: 9 additions & 0 deletions release_text.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
DigOutBox v0.2.0

This is the first full release of the `controller`, `firmware`, and GUI (for Windows). Please consult the [documentation](https://digoutbox.readthedocs.io/) for more information on installation, setup, and usage.

*Changes from v0.1.0:*

- Added support for interlocking the DigOutBox using the `TRIG` line (deactivated by default in firmware)
- Added support for software lockout on the bottom left button of the remote
-

0 comments on commit ffa5745

Please sign in to comment.