From 5ee73350397096196de431ce8b151f63add48c85 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Fri, 23 Jul 2021 09:39:03 -0700 Subject: [PATCH] Workflows: Use actions for cadius and ca65, package and deploy on tag --- .github/workflows/main.yml | 22 ++++++++++++---------- Makefile | 4 +++- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 75edf78..ea52267 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -15,15 +14,18 @@ jobs: steps: - 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 - ca65 --version + - uses: a2stuff/build-install-ca65-action@v1 + - uses: a2stuff/build-install-cadius-action@v1 - 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: "out/chtype.po" diff --git a/Makefile b/Makefile index 543c38f..bbda86f 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ TARGETS = $(OUTDIR)/chtype.BIN $(OUTDIR)/chtime.BIN XATTR := $(shell command -v xattr 2> /dev/null) -.PHONY: clean all +.PHONY: clean all package all: $(OUTDIR) $(TARGETS) $(OUTDIR): @@ -21,6 +21,8 @@ clean: rm -f $(OUTDIR)/*.list rm -f $(TARGETS) +package: + ./package.sh $(OUTDIR)/%.o: %.s $(HEADERS) ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<