2022-04-13 02:02:43 -04:00
name : Stable Release
on :
workflow_dispatch :
jobs :
build :
runs-on : ubuntu-latest
steps :
- name : Get current date
id : date
2024-01-21 13:24:38 -05:00
run : echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
2022-04-13 02:02:43 -04:00
- name : Checkout
uses : actions/checkout@master
with :
fetch-depth : 0
2024-01-05 15:59:15 -05:00
#ref: next
# The branch, tag or SHA to checkout. When checking out the repository that
# triggered a workflow, this defaults to the reference or SHA for that event.
# Otherwise, uses the default branch.
# https://github.com/actions/checkout
# So scheduled runs will use the default branch (next) but its now possible to trigger a workflow from another branch
2022-04-13 02:02:43 -04:00
submodules : true
- name : Git Sumbodule Update
run : |
git submodule update --init --recursive
- name : Get version
id : version
2024-01-21 13:24:38 -05:00
run : echo "version=$(cat .github/workflows/version.txt)" >> $GITHUB_OUTPUT
2022-04-13 02:02:43 -04:00
- name : Get past version
id : past_version
2024-01-21 13:24:38 -05:00
run : echo "past_version=$(cat .github/workflows/past_version.txt)" >> $GITHUB_OUTPUT
2022-04-13 02:02:43 -04:00
- name : Build the Docker image
run : docker build -t portapack-dev -f dockerfile-nogit . --tag my-image-name:$(date +%s)
- name : Make build folder
run : mkdir ${{ github.workspace }}/build
- name : Run the Docker image
run : docker run -e VERSION_STRING=${{ steps.version.outputs.version }} -i -v ${{ github.workspace }}:/havoc portapack-dev
2023-07-10 03:43:39 -04:00
- name : Create Small SD Card ZIP - No World Map
run : |
2024-01-07 01:51:27 -05:00
mkdir -p sdcard/FIRMWARE && cp build/firmware/portapack-h1_h2-mayhem.bin sdcard/FIRMWARE/portapack-mayhem_${{ steps.version.outputs.version }}.bin && mkdir -p sdcard/APPS && cp build/firmware/application/*.ppma sdcard/APPS && cd sdcard && zip -r ../sdcard-no-map.zip . && cd ..
2023-05-21 02:42:38 -04:00
- name : Download world map
run : |
2024-01-10 03:13:43 -05:00
wget https://github.com/portapack-mayhem/mayhem-firmware/releases/download/world_map/world_map.zip
2023-05-21 02:42:38 -04:00
- name : Unzip world map
run : |
unzip world_map.zip -d sdcard/ADSB
2022-04-13 02:02:43 -04:00
- name : Create Firmware ZIP
run : |
zip -j firmware.zip build/firmware/portapack-h1_h2-mayhem.bin && cd flashing && zip -r ../firmware.zip *
- name : Create SD Card ZIP
run : |
2024-01-07 01:51:27 -05:00
mkdir -p sdcard/FIRMWARE && cp build/firmware/portapack-h1_h2-mayhem.bin sdcard/FIRMWARE/portapack-mayhem_${{ steps.version.outputs.version }}.bin && mkdir -p sdcard/APPS && cp build/firmware/application/*.ppma sdcard/APPS && cd sdcard && zip -r ../sdcard.zip . && cd ..
2022-04-13 02:02:43 -04:00
- name : Create changelog
2023-07-11 03:51:22 -04:00
env :
2024-01-03 16:32:34 -05:00
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2022-04-13 02:02:43 -04:00
run : |
2024-01-22 04:50:14 -05:00
{
echo 'content<<EOF'
python3 .github/workflows/changelog.py ${{ steps.past_version.outputs.past_version }}
echo EOF
} >> "$GITHUB_OUTPUT"
2022-04-13 02:02:43 -04:00
id : changelog
- name : Create Release
id : create_release
uses : actions/create-release@v1
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
2022-05-20 16:03:17 -04:00
tag_name : ${{ steps.version.outputs.version }}
2022-04-13 02:02:43 -04:00
release_name : Mayhem firmware ${{ steps.version.outputs.version }}
body : |
**Stable release - ${{ steps.version.outputs.version }}**
2024-01-10 03:13:43 -05:00
This is a fork of the [Havoc](https://github.com/furrtek/portapack-havoc/) firmware, which itself was a fork of the [PortaPack](https://github.com/sharebrained/portapack-hackrf) firmware, an add-on for the [HackRF](http://greatscottgadgets.com/hackrf/). Please check the [readme](https://github.com/portapack-mayhem/mayhem-firmware/blob/master/README.md) for details.
2022-04-13 02:02:43 -04:00
## Release notes
### Revision (${{ steps.version.outputs.version }}):
${{ steps.changelog.outputs.content }}
2024-01-10 03:13:43 -05:00
**Full Changelog** : https://github.com/portapack-mayhem/mayhem-firmware/compare/${{ steps.past_version.outputs.past_version }}...${{ steps.version.outputs.version }}
2022-04-13 02:02:43 -04:00
## Installation
2024-01-10 03:13:43 -05:00
Check the [wiki](https://github.com/portapack-mayhem/mayhem-firmware/wiki/Update-firmware) for details how to upgrade.
2023-12-29 16:11:40 -05:00
__Warning:__ Since release 1.8.0, some applications has been moved to the SD card as we ran out of flash space.
2022-04-13 02:02:43 -04:00
### MicroSD card files
2023-12-29 16:11:40 -05:00
For certain functionality, like external apps, the world map, GPS simulator, and others you need to uncompress (using [7-zip](https://www.7-zip.org/download.html)) the files from `mayhem_vX.Y.Z_COPY_TO_SDCARD.zip` to a FAT32 formatted MicroSD card.
2022-04-13 02:02:43 -04:00
draft : true
prerelease : false
2024-01-03 16:32:34 -05:00
- name : Upload Firmware TAR Asset
id : upload-firmware-tar-asset
uses : actions/upload-release-asset@v1
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.create_release.outputs.upload_url }}
2024-01-18 15:08:02 -05:00
asset_path : build/firmware/portapack-mayhem_OCI.ppfw.tar
2024-01-04 02:52:42 -05:00
asset_name : mayhem_${{ steps.version.outputs.version }}_OCI.ppfw.tar
2024-01-03 16:32:34 -05:00
asset_content_type : application/x-tar
2022-04-13 02:02:43 -04:00
- name : Upload Firmware Asset
id : upload-firmware-asset
uses : actions/upload-release-asset@v1
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.create_release.outputs.upload_url }}
asset_path : ./firmware.zip
asset_name : mayhem_${{ steps.version.outputs.version }}_FIRMWARE.zip
asset_content_type : application/zip
- name : Upload SD Card Assets
id : upload-sd-card-asset
uses : actions/upload-release-asset@v1
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.create_release.outputs.upload_url }}
asset_path : ./sdcard.zip
asset_name : mayhem_${{ steps.version.outputs.version }}_COPY_TO_SDCARD.zip
asset_content_type : application/zip
2023-07-10 03:43:39 -04:00
- name : Upload SD Card Assets - No Map
id : upload-sd-card-asset-no-map
uses : actions/upload-release-asset@v1
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
upload_url : ${{ steps.create_release.outputs.upload_url }}
asset_path : ./sdcard-no-map.zip
asset_name : mayhem_${{ steps.version.outputs.version }}_COPY_TO_SDCARD-no-world-map.zip
asset_content_type : application/zip
2022-04-13 02:02:43 -04:00