From d189b7d553019ba7e646e98fa843414cbedd38cc Mon Sep 17 00:00:00 2001 From: Victoria Fierce Date: Sat, 18 Feb 2023 13:26:33 +0100 Subject: [PATCH] ci: build releases in woodpecker --- .gitignore | 1 + .woodpecker.yaml | 12 ++++++++++++ Makefile | 10 ++++++---- 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 .woodpecker.yaml diff --git a/.gitignore b/.gitignore index e81beda..429bbc7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.DS_Store *.zip *.sha1 +*.swp diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..a703bed --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,12 @@ +pipeline: + build: + image: alpine + commands: + - make + publish: + image: plugins/gitea-release + settings: + api_key: + from_secret: GITEA_KEY + base_url: https://gitea.malloc.hackerbots.net/ + files: *.zip *.sha1 diff --git a/Makefile b/Makefile index 9cbdbad..e7a3593 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,11 @@ .PHONY: all -all: malloc-data-1.0.zip malloc-data-1.0.zip.sha1 +BUILD_VERSION:=$(shell git describe --tags) -malloc-data-1.0.zip: pack.mcmeta - zip -r malloc-data-1.0.zip pack.mcmeta data +all: malloc-data-$(BUILD_VERSION).zip malloc-data-$(BUILD_VERSION).zip.sha1 -malloc-data-1.0.zip.sha1: malloc-data-1.0.zip +malloc-data-$(BUILD_VERSION).zip: pack.mcmeta + zip -r $@ pack.mcmeta data + +malloc-data-$(BUILD_VERSION).zip.sha1: malloc-data-$(BUILD_VERSION).zip sha1sum $< > $@