name: Release on: push: tags: - '[0-9]+.[0-9]+.[0-9]+' permissions: contents: write jobs: release: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 cache: npm - run: npm ci - name: Lint run: npm run lint - name: E2E gate run: timeout 600 npm run e2e - name: Upload e2e artifacts on failure if: failure() uses: actions/upload-artifact@v4 with: name: e2e-${{ github.run_id }} if-no-files-found: ignore path: | .e2e/artifact.json .e2e/results/ - name: Create Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | tag="${GITHUB_REF#refs/tags/}" if gh release view "$tag" >/dev/null 2>&1; then gh release upload "$tag" --clobber main.js main.js.map manifest.json styles.css else gh release create "$tag" \ --title "$tag" \ --generate-notes \ main.js main.js.map manifest.json styles.css fi