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 ../