Skip to content

Commit 5ee7335

Browse files
Workflows: Use actions for cadius and ca65, package and deploy on tag
1 parent 090820d commit 5ee7335

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

.github/workflows/main.yml

+12-10
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ name: build
33
on:
44
push:
55
branches: [ main ]
6+
tags: ['*']
67
pull_request:
78
branches: [ main ]
8-
9-
# Allows you to run this workflow manually from the Actions tab
109
workflow_dispatch:
1110

1211
jobs:
@@ -15,15 +14,18 @@ jobs:
1514

1615
steps:
1716
- uses: actions/checkout@v2
18-
19-
- name: build and install cc65 components
20-
run: |
21-
git clone https://github.com/cc65/cc65 /tmp/cc65
22-
sudo make -C /tmp/cc65 ca65 ld65 avail
23-
ca65 --version
17+
- uses: a2stuff/build-install-ca65-action@v1
18+
- uses: a2stuff/build-install-cadius-action@v1
2419

2520
- name: build
2621
env:
2722
TERM: xterm-256color
28-
run: |
29-
make
23+
run: >
24+
make && make package
25+
26+
- name: deploy new version
27+
if: startsWith(github.ref, 'refs/tags/')
28+
uses: ncipollo/[email protected]
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
artifacts: "out/chtype.po"

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ TARGETS = $(OUTDIR)/chtype.BIN $(OUTDIR)/chtime.BIN
88

99
XATTR := $(shell command -v xattr 2> /dev/null)
1010

11-
.PHONY: clean all
11+
.PHONY: clean all package
1212
all: $(OUTDIR) $(TARGETS)
1313

1414
$(OUTDIR):
@@ -21,6 +21,8 @@ clean:
2121
rm -f $(OUTDIR)/*.list
2222
rm -f $(TARGETS)
2323

24+
package:
25+
./package.sh
2426

2527
$(OUTDIR)/%.o: %.s $(HEADERS)
2628
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<

0 commit comments

Comments
 (0)