From 8b5d69ac70b56a6c8afb1fa6f13934f4429b067f Mon Sep 17 00:00:00 2001 From: Ashhhleyyy Date: Tue, 20 Feb 2024 00:03:13 +0000 Subject: [PATCH] feat(ci): build and upload extension ZIP --- .forgejo/workflows/build-ext.yml | 23 +++++++++++++++++++++++ .forgejo/workflows/publish.yml | 2 ++ .gitignore | 1 + build-ext.sh | 8 ++++++++ 4 files changed, 34 insertions(+) create mode 100644 .forgejo/workflows/build-ext.yml create mode 100755 build-ext.sh diff --git a/.forgejo/workflows/build-ext.yml b/.forgejo/workflows/build-ext.yml new file mode 100644 index 0000000..03bea22 --- /dev/null +++ b/.forgejo/workflows/build-ext.yml @@ -0,0 +1,23 @@ +name: Build extension ZIP + +on: + push: + branches: ['main'] + paths: + - 'extension/**/*' + +jobs: + publish: + name: Build extension + runs-on: docker + + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build extension + runs: ./build-ext.sh + - name: Upload extension + actions/upload-artifact@v4 + with: + name: aci-ext.zip + path: aci-ext.zip diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml index 786bf3f..2df7ab4 100644 --- a/.forgejo/workflows/publish.yml +++ b/.forgejo/workflows/publish.yml @@ -3,6 +3,8 @@ name: Publish docker image on: push: branches: ['main'] + paths: + - 'backend/**/*' jobs: publish: diff --git a/.gitignore b/.gitignore index a631881..a6756ed 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ __pycache__/ .direnv/ result checkin.db +aci-*.zip diff --git a/build-ext.sh b/build-ext.sh new file mode 100755 index 0000000..4e0e1db --- /dev/null +++ b/build-ext.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -uex pipefail + +cd extension/ +echo "Building ZIP..." +zip -- -r -FS ../aci-ext.zip * +cd ../