From aa0d28c1b9b1437f13562d1376a1de143ad80814 Mon Sep 17 00:00:00 2001 From: Michael Timbert Date: Tue, 24 Feb 2026 15:07:18 +0100 Subject: [PATCH 1/2] Add artifact build to the CI --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e56a03a1..cc1c762f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,3 +34,38 @@ jobs: - name: Run e2e tests run: npm run e2e + + build-artifact: + needs: tests_e2e + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v3 + with: + node-version: 24.x + cache: npm + + - name: apt install + run: sudo apt-get install -y git jq + + - name: build + run: | + npm install + npm run release + + - name: Get short SHA + id: short_sha + run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Get Zonemaster-GUI version + id: version + run: | + VERSION=`jq -r '.version | sub("^v"; "")' package.json` + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: upload artifact + uses: actions/upload-artifact@v4 + with: + name: zonemaster_web_gui_v${{ steps.version.outputs.version }}-${{ steps.short_sha.outputs.short_sha }} + path: zonemaster_web_gui_v${{ steps.version.outputs.version }}.zip From c471ca76c6107a7660cf3f7cabd8ba1d4e58389d Mon Sep 17 00:00:00 2001 From: Michael Timbert Date: Tue, 3 Mar 2026 13:51:14 +0100 Subject: [PATCH 2/2] fix sha commit --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc1c762f..0d03af83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,12 @@ jobs: - name: Get short SHA id: short_sha - run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "SHORT_SHA=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7)" >> $GITHUB_ENV + else + echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV + fi - name: Get Zonemaster-GUI version id: version @@ -67,5 +72,5 @@ jobs: - name: upload artifact uses: actions/upload-artifact@v4 with: - name: zonemaster_web_gui_v${{ steps.version.outputs.version }}-${{ steps.short_sha.outputs.short_sha }} + name: zonemaster_web_gui_v${{ steps.version.outputs.version }}-${{ env.SHORT_SHA }} path: zonemaster_web_gui_v${{ steps.version.outputs.version }}.zip