Add GH Actions workflow

This commit is contained in:
Matt Harlum 2023-02-28 16:17:24 +00:00
parent 8a05353f2b
commit 5c93e5817c
3 changed files with 73 additions and 0 deletions

43
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,43 @@
name: Generate release files
permissions:
contents: write
on:
push:
tags:
- "Release_**"
workflow_dispatch:
jobs:
make_software:
runs-on: ubuntu-latest
container: liv2/amiga-gcc-amitools
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: make software package
- uses: actions/upload-artifact@master
with:
name: software
path: artifacts/*
draft_release:
runs-on: ubuntu-latest
needs:
- make_software
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: artifacts
- name: release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
artifacts/software/**/*

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
artifacts/
tmp/

28
Makefile Normal file
View File

@ -0,0 +1,28 @@
SHELL:=/bin/bash
CURDIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
TMPDIR=$(CURDIR)/tmp/
ARTIFACTDIR:=$(CURDIR)/artifacts
.PHONY: all software clean
software:
$(MAKE) -C bootrom all
$(MAKE) -C addram all
$(MAKE) -C cflash all
# $(MAKE) -C iderom all
clean:
$(MAKE) -C bootrom clean
$(MAKE) -C addram clean
$(MAKE) -C cflash clean
# $(MAKE) -C iderom clean
rm -rf $(ARTIFACTDIR)
rm -rf $(TMPDIR)
package: addram/addram bootrom/bootrom cflash/cflash
rm -rf $(TMPDIR)
mkdir -p $(TMPDIR)
mkdir -p $(ARTIFACTDIR)
cp $^ $(TMPDIR)
cd $(TMPDIR) && xdftool $(ARTIFACTDIR)/CIDER-Software.adf format CIDER $(addprefix + write ,$(notdir $^))
cd $(TMPDIR) && lha -c $(ARTIFACTDIR)/CIDER-Software.lha $(notdir $^)