From b97255ccd6b0f6fb58d3abc912080154d0cd8412 Mon Sep 17 00:00:00 2001 From: KoloMl Date: Thu, 2 Oct 2025 13:40:02 +0400 Subject: [PATCH] Release CI action Builds the extension for both sites and uploads them as artifacts. This will make it possible to just release the project and then grab the ready-to-be-deployed archive for publishing. This change was made using Cursor. Just a small test run to check how useful it is for my workflows. --- .github/workflows/build-extensions.yml | 63 ++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/build-extensions.yml diff --git a/.github/workflows/build-extensions.yml b/.github/workflows/build-extensions.yml new file mode 100644 index 0000000..bf25b13 --- /dev/null +++ b/.github/workflows/build-extensions.yml @@ -0,0 +1,63 @@ +name: Build Extensions + +on: + push: + branches: [ master ] + +jobs: + build-extensions: + runs-on: ubuntu-latest + + strategy: + matrix: + site: [furbooru, derpibooru] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build extension for ${{ matrix.site }} + run: | + if [ "${{ matrix.site }}" = "derpibooru" ]; then + npm run build:derpibooru + else + npm run build + fi + + - name: Create extension zip + run: | + cd build + zip -r "../${{ matrix.site }}-tagging-assistant-extension.zip" . + + - name: Upload extension artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.site }}-tagging-assistant-extension + path: ${{ matrix.site }}-tagging-assistant-extension.zip + retention-days: 30 + + create-release-artifacts: + runs-on: ubuntu-latest + needs: build-extensions + + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Create combined artifact + uses: actions/upload-artifact@v4 + with: + name: all-extensions + path: artifacts/ + retention-days: 90