From 6bef9a203053868c7d48e6eb52b6d73c08fe56c2 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 10 Dec 2023 22:01:34 +0100 Subject: [PATCH 1/4] Starting pipeline --- .gitea/workflows/release-on-develop.yml | 0 .gitea/workflows/release-on-tag.yml | 31 +++++++++++++++++++++++++ on-site-vtt/module.json | 12 +++++----- 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 .gitea/workflows/release-on-develop.yml create mode 100644 .gitea/workflows/release-on-tag.yml diff --git a/.gitea/workflows/release-on-develop.yml b/.gitea/workflows/release-on-develop.yml new file mode 100644 index 0000000..e69de29 diff --git a/.gitea/workflows/release-on-tag.yml b/.gitea/workflows/release-on-tag.yml new file mode 100644 index 0000000..2747f44 --- /dev/null +++ b/.gitea/workflows/release-on-tag.yml @@ -0,0 +1,31 @@ +name: On-Site VTT - Release +run-name: Run for tag ${{ github.ref_name }} on ${{ github.ref }} +on: + push: + branches: [ main ] + tags: [0-9]+.[0-9]+.[0-9]+ +jobs: + build: + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Replace version in module.json + uses: jacobtomlinson/gha-find-replace@v3 + with: + find: "{{version}}" + replace: ${{ github.ref_name }} + include: "on-site-vtt/module.json" + - name: Replace branch in module.json + uses: jacobtomlinson/gha-find-replace@v3 + with: + find: "{{branch}}" + replace: ${{ github.ref }} + include: "on-site-vtt/module.json" + - name: Pack and release + uses: https://gitea.com/actions/release-action@main + with: + files: |- + on-site-vtt/** + api_key: '${{secrets.RELEASE_TOKEN}}' diff --git a/on-site-vtt/module.json b/on-site-vtt/module.json index 5f29f3b..dcad2f7 100644 --- a/on-site-vtt/module.json +++ b/on-site-vtt/module.json @@ -2,7 +2,7 @@ "id": "on-site-vtt", "title": "On-Site VTT - Virtual Tabletop, now with less virtual", "description": "A simple module adding functionality to improve playability for multiple players on a single screen/digital map.", - "version": "0.0.1", + "version": "{{version}}", "compatibility": { "minimum": "10", "verified": "11" @@ -26,13 +26,13 @@ } ], "url": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT", - "manifest": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/main/on-site-vtt/module.json", - "download": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/packages", + "manifest": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/{{branch}}/on-site-vtt/module.json", + "download": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/releases/download/{{version}}/on-site-vtt.zip", "bugs": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/issues", - "readme": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/main/README.md", - "license" :"https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/main/LICENSE.txt", + "readme": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/{{branch}}/README.md", + "license" :"https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/{{branch}}/LICENSE.txt", "flags": { "allowBugReporter": true } - } \ No newline at end of file + } From 29ace6cc3f2145eeba2674cb66ea161f19de6f0a Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 10 Dec 2023 22:04:07 +0100 Subject: [PATCH 2/4] Starting pipeline --- .gitea/workflows/release-on-tag.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/release-on-tag.yml b/.gitea/workflows/release-on-tag.yml index 2747f44..4fb301c 100644 --- a/.gitea/workflows/release-on-tag.yml +++ b/.gitea/workflows/release-on-tag.yml @@ -1,9 +1,11 @@ name: On-Site VTT - Release run-name: Run for tag ${{ github.ref_name }} on ${{ github.ref }} + on: push: branches: [ main ] tags: [0-9]+.[0-9]+.[0-9]+ + jobs: build: steps: From 46b9c082218f3d0775efc942391040c895e1d71d Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 10 Dec 2023 22:08:32 +0100 Subject: [PATCH 3/4] Starting pipeline --- .gitea/workflows/release-on-tag.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release-on-tag.yml b/.gitea/workflows/release-on-tag.yml index 4fb301c..391e4e2 100644 --- a/.gitea/workflows/release-on-tag.yml +++ b/.gitea/workflows/release-on-tag.yml @@ -3,8 +3,10 @@ run-name: Run for tag ${{ github.ref_name }} on ${{ github.ref }} on: push: - branches: [ main ] - tags: [0-9]+.[0-9]+.[0-9]+ + branches: + - main + tags: + - "*" jobs: build: @@ -30,4 +32,4 @@ jobs: with: files: |- on-site-vtt/** - api_key: '${{secrets.RELEASE_TOKEN}}' + api_key: "${{secrets.RELEASE_TOKEN}}" From c18dc98d8ea58145741fa524847dda1e135b3e0c Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 10 Dec 2023 22:15:11 +0100 Subject: [PATCH 4/4] Starting pipeline --- .gitea/workflows/release-on-develop.yml | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.gitea/workflows/release-on-develop.yml b/.gitea/workflows/release-on-develop.yml index e69de29..3864fcc 100644 --- a/.gitea/workflows/release-on-develop.yml +++ b/.gitea/workflows/release-on-develop.yml @@ -0,0 +1,36 @@ +name: On-Site VTT - Develop +run-name: Run on ${{ github.ref }} + +on: + push: + branches: + - develop + +jobs: + build: + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - name: Replace version in module.json + uses: jacobtomlinson/gha-find-replace@v3 + with: + find: "{{version}}" + replace: dev-${{ steps.date.outputs.date }}-${{ github.run_number }} + include: "on-site-vtt/module.json" + - name: Replace branch in module.json + uses: jacobtomlinson/gha-find-replace@v3 + with: + find: "{{branch}}" + replace: ${{ github.ref }} + include: "on-site-vtt/module.json" + - name: Pack and release + uses: https://gitea.com/actions/release-action@main + with: + files: |- + on-site-vtt/** + api_key: "${{secrets.RELEASE_TOKEN}}"