Skip to content

Commit

Permalink
Workflow: deploy on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
inexorabletash committed Jul 23, 2021
1 parent ae13e28 commit 304befc
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 21 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ name: build
on:
push:
branches: [ main ]
tags: ['*']
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
Expand All @@ -17,13 +16,26 @@ jobs:
- uses: actions/checkout@v2

- name: build and install cc65 components
run: |
git clone https://github.com/cc65/cc65 /tmp/cc65
sudo make -C /tmp/cc65 ca65 ld65 avail
run: >
git clone https://github.com/cc65/cc65 /tmp/cc65 &&
sudo make -C /tmp/cc65 ca65 ld65 avail &&
ca65 --version
- name: build and install cadius
run: >
git clone https://github.com/mach-kernel/cadius /tmp/cadius &&
make -C /tmp/cadius &&
sudo make -C /tmp/cadius install
- name: build
env:
TERM: xterm-256color
run: |
make
run: >
make && make package
- name: deploy new version
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1.8.6
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "prodos-drivers.po"
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
targets := ns.clock cricket dclock selectors ram.drv quit

.PHONY: all $(targets)
.PHONY: all $(targets) package

all: $(targets)

Expand All @@ -17,3 +17,6 @@ clean:
tput setaf 2 && echo "cleaning $$dir" && tput sgr0; \
$(MAKE) -C $$dir clean; \
done

package:
./package.sh
27 changes: 14 additions & 13 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set -e

PACKDIR=$(mktemp -d)
IMGFILE="drivers.po"
IMGFILE="prodos-drivers.po"
VOLNAME="drivers"

rm -f "$IMGFILE"
Expand All @@ -18,18 +18,19 @@ add_file () {
cadius ADDFILE "$IMGFILE" "$3" "$PACKDIR/$2" --no-case-bits --quiet
}

add_file "bbb/out/buhbye.system.SYS" "buhbye.system#FF0000" "/$VOLNAME"
add_file "bbb/out/bbb.system.SYS" "bbb.system#FF0000" "/$VOLNAME"
add_file "selector/out/selector.system.SYS" "selector.system#FF0000" "/$VOLNAME"
add_file "cricket/out/cricket.system.SYS" "cricket.system#FF0000" "/$VOLNAME"
add_file "cricket/out/date.BIN" "date#062000" "/$VOLNAME/CRICKET.UTIL"
add_file "cricket/out/set.date.BIN" "set.date#062000" "/$VOLNAME/CRICKET.UTIL"
add_file "cricket/out/set.time.BIN" "set.time#062000" "/$VOLNAME/CRICKET.UTIL"
add_file "cricket/out/test.BIN" "test#062000" "/$VOLNAME/CRICKET.UTIL"
add_file "ns.clock/out/ns.clock.system.SYS" "ns.clock.system#FF0000" "/$VOLNAME"
add_file "dclock/out/dclock.system.SYS" "dclock.system#FF0000" "/$VOLNAME"
add_file "quit/out/quit.system.SYS" "quit.system#FF0000" "/$VOLNAME"
add_file "ram.drv/out/ram.drv.system.SYS" "ram.drv.system#FF0000" "/$VOLNAME"
add_file "cricket/out/cricket.system.SYS" "cricket.system#FF0000" "/$VOLNAME"
add_file "cricket/out/date.BIN" "date#062000" "/$VOLNAME/CRICKET.UTIL"
add_file "cricket/out/set.date.BIN" "set.date#062000" "/$VOLNAME/CRICKET.UTIL"
add_file "cricket/out/set.time.BIN" "set.time#062000" "/$VOLNAME/CRICKET.UTIL"
add_file "cricket/out/test.BIN" "test#062000" "/$VOLNAME/CRICKET.UTIL"
add_file "dclock/out/dclock.system.SYS" "dclock.system#FF0000" "/$VOLNAME"
add_file "ns.clock/out/ns.clock.system.SYS" "ns.clock.system#FF0000" "/$VOLNAME"
add_file "quit/out/quit.system.SYS" "quit.system#FF0000" "/$VOLNAME"
add_file "ram.drv/out/ram.drv.system.SYS" "ram.drv.system#FF0000" "/$VOLNAME"
add_file "selectors/out/bbb.system.SYS" "bbb.system#FF0000" "/$VOLNAME"
add_file "selectors/out/buhbye.system.SYS" "buhbye.system#FF0000" "/$VOLNAME"
add_file "selectors/out/bye.system.SYS" "bye.system#FF0000" "/$VOLNAME"
add_file "selectors/out/selector.system.SYS" "selector.system#FF0000" "/$VOLNAME"

rm -r "$PACKDIR"

Expand Down

0 comments on commit 304befc

Please sign in to comment.