From 04f531862aa9dbc06a1120496a9e701435edfc32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20S=C3=B6derberg?= Date: Sat, 11 Jul 2026 17:29:32 +0200 Subject: [PATCH] Add .gitea/workflows/build-release.yaml --- .gitea/workflows/build-release.yaml | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflows/build-release.yaml diff --git a/.gitea/workflows/build-release.yaml b/.gitea/workflows/build-release.yaml new file mode 100644 index 0000000..e5ca120 --- /dev/null +++ b/.gitea/workflows/build-release.yaml @@ -0,0 +1,39 @@ +name: Build & Attach Release + +on: + release: + types: [published] + +jobs: + build-and-release: + name: Build and Attach ZIP + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies and Build + run: | + npm ci + npm run build + + - name: Create ZIP archive + run: | + cd dist + zip -r ../naturvardarna-site.zip . + + - name: Attach ZIP to Release + uses: softprops/action-gh-release@v2 + with: + name: ${{ github.event.release.tag_name }} + body: ${{ github.event.release.body || 'Automated release of the Naturvärdarna static site.' }} + files: naturvardarna-site.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file