From 3dac872eb021291f8ed0fa61ff898bca2fbfb606 Mon Sep 17 00:00:00 2001 From: Snider Date: Wed, 4 Feb 2026 09:22:32 +0000 Subject: [PATCH] ci: consolidate duplicate workflows and merge CodeQL configs (#280) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove 17 duplicate workflow files that were split copies of the combined originals. Each family (CI, CodeQL, Coverage, PR Build, Alpha Release) had the same job duplicated across separate push/pull_request/schedule/manual trigger files. Merge codeql.yml and codescan.yml into a single codeql.yml with a language matrix covering go, javascript-typescript, python, and actions — matching the previous default setup coverage. Remaining workflows (one per family): - ci.yml (push + PR + manual) - codeql.yml (push + PR + schedule, all languages) - coverage.yml (push + PR + manual) - alpha-release.yml (push + manual) - pr-build.yml (PR + manual) - release.yml (tag push) - agent-verify.yml, auto-label.yml, auto-project.yml Co-authored-by: Claude Opus 4.5 --- .github/workflows/alpha-release-manual.yml | 92 -------------------- .github/workflows/alpha-release-push.yml | 93 --------------------- .github/workflows/ci-manual.yml | 41 --------- .github/workflows/ci-pull-request.yml | 42 ---------- .github/workflows/ci-push.yml | 42 ---------- .github/workflows/codeql-pull-request.yml | 32 ------- .github/workflows/codeql-push.yml | 32 ------- .github/workflows/codeql-schedule.yml | 32 ------- .github/workflows/codeql.yml | 12 ++- .github/workflows/codescan-pull-request.yml | 30 ------- .github/workflows/codescan-push.yml | 30 ------- .github/workflows/codescan-schedule.yml | 30 ------- .github/workflows/codescan.yml | 36 -------- .github/workflows/coverage-manual.yml | 46 ---------- .github/workflows/coverage-pull-request.yml | 47 ----------- .github/workflows/coverage-push.yml | 47 ----------- .github/workflows/pr-build-manual.yml | 89 -------------------- .github/workflows/pr-build-pull-request.yml | 89 -------------------- 18 files changed, 8 insertions(+), 854 deletions(-) delete mode 100644 .github/workflows/alpha-release-manual.yml delete mode 100644 .github/workflows/alpha-release-push.yml delete mode 100644 .github/workflows/ci-manual.yml delete mode 100644 .github/workflows/ci-pull-request.yml delete mode 100644 .github/workflows/ci-push.yml delete mode 100644 .github/workflows/codeql-pull-request.yml delete mode 100644 .github/workflows/codeql-push.yml delete mode 100644 .github/workflows/codeql-schedule.yml delete mode 100644 .github/workflows/codescan-pull-request.yml delete mode 100644 .github/workflows/codescan-push.yml delete mode 100644 .github/workflows/codescan-schedule.yml delete mode 100644 .github/workflows/codescan.yml delete mode 100644 .github/workflows/coverage-manual.yml delete mode 100644 .github/workflows/coverage-pull-request.yml delete mode 100644 .github/workflows/coverage-push.yml delete mode 100644 .github/workflows/pr-build-manual.yml delete mode 100644 .github/workflows/pr-build-pull-request.yml diff --git a/.github/workflows/alpha-release-manual.yml b/.github/workflows/alpha-release-manual.yml deleted file mode 100644 index e9e194a..0000000 --- a/.github/workflows/alpha-release-manual.yml +++ /dev/null @@ -1,92 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch -name: "Alpha Release: Manual" - -on: - workflow_dispatch: - -permissions: - contents: write - id-token: write - attestations: write - -env: - NEXT_VERSION: "0.0.4" - -jobs: - build: - strategy: - matrix: - include: - - os: ubuntu-latest - platform: linux/amd64 - - os: ubuntu-latest - platform: linux/arm64 - - os: macos-latest - platform: darwin/universal - - os: windows-latest - platform: windows/amd64 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v6 - - - name: Build - uses: host-uk/build@v3 - with: - build-name: core - build-platform: ${{ matrix.platform }} - build: true - package: true - sign: false - - release: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Download artifacts - uses: actions/download-artifact@v7 - with: - path: dist - merge-multiple: true - - - name: Prepare release files - run: | - mkdir -p release - cp dist/* release/ 2>/dev/null || true - ls -la release/ - - - name: Create alpha release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - VERSION="v${{ env.NEXT_VERSION }}-alpha.${{ github.run_number }}" - - gh release create "$VERSION" \ - --title "Alpha: $VERSION" \ - --notes "Canary build from dev branch. - - **Version:** $VERSION - **Commit:** ${{ github.sha }} - **Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC') - **Run:** ${{ github.run_id }} - - ## Channel: Alpha (Canary) - - This is an automated pre-release for early testing. - - - Systems and early adopters can test breaking changes - - Quality scoring determines promotion to beta - - Use stable releases for production - - ## Installation - - \`\`\`bash - # macOS/Linux - curl -fsSL https://github.com/host-uk/core/releases/download/$VERSION/core-linux-amd64 -o core - chmod +x core && sudo mv core /usr/local/bin/ - \`\`\` - " \ - --prerelease \ - --target dev \ - release/* diff --git a/.github/workflows/alpha-release-push.yml b/.github/workflows/alpha-release-push.yml deleted file mode 100644 index 674e107..0000000 --- a/.github/workflows/alpha-release-push.yml +++ /dev/null @@ -1,93 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push -name: "Alpha Release: Push" - -on: - push: - branches: [dev] - -permissions: - contents: write - id-token: write - attestations: write - -env: - NEXT_VERSION: "0.0.4" - -jobs: - build: - strategy: - matrix: - include: - - os: ubuntu-latest - platform: linux/amd64 - - os: ubuntu-latest - platform: linux/arm64 - - os: macos-latest - platform: darwin/universal - - os: windows-latest - platform: windows/amd64 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v6 - - - name: Build - uses: host-uk/build@v3 - with: - build-name: core - build-platform: ${{ matrix.platform }} - build: true - package: true - sign: false - - release: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Download artifacts - uses: actions/download-artifact@v7 - with: - path: dist - merge-multiple: true - - - name: Prepare release files - run: | - mkdir -p release - cp dist/* release/ 2>/dev/null || true - ls -la release/ - - - name: Create alpha release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - VERSION="v${{ env.NEXT_VERSION }}-alpha.${{ github.run_number }}" - - gh release create "$VERSION" \ - --title "Alpha: $VERSION" \ - --notes "Canary build from dev branch. - - **Version:** $VERSION - **Commit:** ${{ github.sha }} - **Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC') - **Run:** ${{ github.run_id }} - - ## Channel: Alpha (Canary) - - This is an automated pre-release for early testing. - - - Systems and early adopters can test breaking changes - - Quality scoring determines promotion to beta - - Use stable releases for production - - ## Installation - - \`\`\`bash - # macOS/Linux - curl -fsSL https://github.com/host-uk/core/releases/download/$VERSION/core-linux-amd64 -o core - chmod +x core && sudo mv core /usr/local/bin/ - \`\`\` - " \ - --prerelease \ - --target dev \ - release/* diff --git a/.github/workflows/ci-manual.yml b/.github/workflows/ci-manual.yml deleted file mode 100644 index fd5459c..0000000 --- a/.github/workflows/ci-manual.yml +++ /dev/null @@ -1,41 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch -name: "CI: Manual" - -on: - workflow_dispatch: - -env: - CORE_VERSION: dev - -jobs: - qa: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Set up Go - uses: actions/setup-go@v6 - with: - go-version-file: 'go.mod' - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev - - - name: Build core CLI - run: | - go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core . - core --version - - - name: Generate code - run: go generate ./internal/cmd/updater/... - - - name: Run QA - # Skip lint until golangci-lint supports Go 1.25 - run: core go qa --skip=lint - - - name: Verify build - run: | - core build --targets=linux/amd64 --ci - dist/linux_amd64/core --version diff --git a/.github/workflows/ci-pull-request.yml b/.github/workflows/ci-pull-request.yml deleted file mode 100644 index e4cfc42..0000000 --- a/.github/workflows/ci-pull-request.yml +++ /dev/null @@ -1,42 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request -name: "CI: Pull Request" - -on: - pull_request: - branches: [dev, main] - -env: - CORE_VERSION: dev - -jobs: - qa: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Set up Go - uses: actions/setup-go@v6 - with: - go-version-file: 'go.mod' - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev - - - name: Build core CLI - run: | - go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core . - core --version - - - name: Generate code - run: go generate ./internal/cmd/updater/... - - - name: Run QA - # Skip lint until golangci-lint supports Go 1.25 - run: core go qa --skip=lint - - - name: Verify build - run: | - core build --targets=linux/amd64 --ci - dist/linux_amd64/core --version diff --git a/.github/workflows/ci-push.yml b/.github/workflows/ci-push.yml deleted file mode 100644 index 7039b67..0000000 --- a/.github/workflows/ci-push.yml +++ /dev/null @@ -1,42 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push -name: "CI: Push" - -on: - push: - branches: [dev, main] - -env: - CORE_VERSION: dev - -jobs: - qa: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Set up Go - uses: actions/setup-go@v6 - with: - go-version-file: 'go.mod' - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev - - - name: Build core CLI - run: | - go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core . - core --version - - - name: Generate code - run: go generate ./internal/cmd/updater/... - - - name: Run QA - # Skip lint until golangci-lint supports Go 1.25 - run: core go qa --skip=lint - - - name: Verify build - run: | - core build --targets=linux/amd64 --ci - dist/linux_amd64/core --version diff --git a/.github/workflows/codeql-pull-request.yml b/.github/workflows/codeql-pull-request.yml deleted file mode 100644 index 4121a5b..0000000 --- a/.github/workflows/codeql-pull-request.yml +++ /dev/null @@ -1,32 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request -name: "CodeQL: Pull Request" - -on: - pull_request: - branches: [dev, main] - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - languages: go - - - name: Autobuild - uses: github/codeql-action/autobuild@v4 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4 - with: - category: "/language:go" diff --git a/.github/workflows/codeql-push.yml b/.github/workflows/codeql-push.yml deleted file mode 100644 index 37bb3de..0000000 --- a/.github/workflows/codeql-push.yml +++ /dev/null @@ -1,32 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push -name: "CodeQL: Push" - -on: - push: - branches: [dev, main] - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - languages: go - - - name: Autobuild - uses: github/codeql-action/autobuild@v4 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4 - with: - category: "/language:go" diff --git a/.github/workflows/codeql-schedule.yml b/.github/workflows/codeql-schedule.yml deleted file mode 100644 index bcb565c..0000000 --- a/.github/workflows/codeql-schedule.yml +++ /dev/null @@ -1,32 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule -name: "CodeQL: Schedule" - -on: - schedule: - - cron: "0 6 * * 1" - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - languages: go - - - name: Autobuild - uses: github/codeql-action/autobuild@v4 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4 - with: - category: "/language:go" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index de78b53..1bc44a0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -10,13 +10,18 @@ on: jobs: analyze: - name: Analyze + name: Analyze (${{ matrix.language }}) runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write + strategy: + fail-fast: false + matrix: + language: [go, javascript-typescript, python, actions] + steps: - name: Checkout uses: actions/checkout@v6 @@ -24,7 +29,7 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v4 with: - languages: go + languages: ${{ matrix.language }} - name: Autobuild uses: github/codeql-action/autobuild@v4 @@ -32,5 +37,4 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 with: - category: "/language:go" - + category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/codescan-pull-request.yml b/.github/workflows/codescan-pull-request.yml deleted file mode 100644 index f6c1672..0000000 --- a/.github/workflows/codescan-pull-request.yml +++ /dev/null @@ -1,30 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request -name: "Code Scanning: Pull Request" - -on: - pull_request: - branches: ["dev"] - -jobs: - CodeQL: - runs-on: ubuntu-latest - - permissions: - security-events: write - actions: read - contents: read - - steps: - - name: "Checkout Repository" - uses: actions/checkout@v6 - - - name: "Initialize CodeQL" - uses: github/codeql-action/init@v4 - with: - languages: go,javascript,typescript - - - name: "Autobuild" - uses: github/codeql-action/autobuild@v4 - - - name: "Perform CodeQL Analysis" - uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/codescan-push.yml b/.github/workflows/codescan-push.yml deleted file mode 100644 index bf8694c..0000000 --- a/.github/workflows/codescan-push.yml +++ /dev/null @@ -1,30 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push -name: "Code Scanning: Push" - -on: - push: - branches: ["dev"] - -jobs: - CodeQL: - runs-on: ubuntu-latest - - permissions: - security-events: write - actions: read - contents: read - - steps: - - name: "Checkout Repository" - uses: actions/checkout@v6 - - - name: "Initialize CodeQL" - uses: github/codeql-action/init@v4 - with: - languages: go,javascript,typescript - - - name: "Autobuild" - uses: github/codeql-action/autobuild@v4 - - - name: "Perform CodeQL Analysis" - uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/codescan-schedule.yml b/.github/workflows/codescan-schedule.yml deleted file mode 100644 index b9778c1..0000000 --- a/.github/workflows/codescan-schedule.yml +++ /dev/null @@ -1,30 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule -name: "Code Scanning: Schedule" - -on: - schedule: - - cron: "0 2 * * 1-5" - -jobs: - CodeQL: - runs-on: ubuntu-latest - - permissions: - security-events: write - actions: read - contents: read - - steps: - - name: "Checkout Repository" - uses: actions/checkout@v6 - - - name: "Initialize CodeQL" - uses: github/codeql-action/init@v4 - with: - languages: go,javascript,typescript - - - name: "Autobuild" - uses: github/codeql-action/autobuild@v4 - - - name: "Perform CodeQL Analysis" - uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/codescan.yml b/.github/workflows/codescan.yml deleted file mode 100644 index f514e09..0000000 --- a/.github/workflows/codescan.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: "Code Scanning" - -on: - push: - branches: ["dev"] - pull_request: - branches: ["dev"] - schedule: - - cron: "0 2 * * 1-5" - -jobs: - CodeQL: - runs-on: ubuntu-latest - - permissions: - # required for all workflows - security-events: write - - # only required for workflows in private repositories - actions: read - contents: read - - steps: - - name: "Checkout Repository" - uses: actions/checkout@v6 - - - name: "Initialize CodeQL" - uses: github/codeql-action/init@v4 - with: - languages: go,javascript,typescript - - - name: "Autobuild" - uses: github/codeql-action/autobuild@v4 - - - name: "Perform CodeQL Analysis" - uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/coverage-manual.yml b/.github/workflows/coverage-manual.yml deleted file mode 100644 index 68f0b07..0000000 --- a/.github/workflows/coverage-manual.yml +++ /dev/null @@ -1,46 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch -name: "Coverage: Manual" - -on: - workflow_dispatch: - -env: - CORE_VERSION: dev - -jobs: - coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Set up Go - uses: actions/setup-go@v6 - with: - go-version-file: 'go.mod' - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev - - - name: Build core CLI - run: | - go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core . - core --version - - - name: Generate code - run: go generate ./internal/cmd/updater/... - - - name: Run coverage - run: core go cov - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - - name: Upload coverage report - uses: actions/upload-artifact@v6 - with: - name: coverage-report - path: coverage.txt diff --git a/.github/workflows/coverage-pull-request.yml b/.github/workflows/coverage-pull-request.yml deleted file mode 100644 index 60daaaf..0000000 --- a/.github/workflows/coverage-pull-request.yml +++ /dev/null @@ -1,47 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request -name: "Coverage: Pull Request" - -on: - pull_request: - branches: [dev, main] - -env: - CORE_VERSION: dev - -jobs: - coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Set up Go - uses: actions/setup-go@v6 - with: - go-version-file: 'go.mod' - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev - - - name: Build core CLI - run: | - go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core . - core --version - - - name: Generate code - run: go generate ./internal/cmd/updater/... - - - name: Run coverage - run: core go cov - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - - name: Upload coverage report - uses: actions/upload-artifact@v6 - with: - name: coverage-report - path: coverage.txt diff --git a/.github/workflows/coverage-push.yml b/.github/workflows/coverage-push.yml deleted file mode 100644 index 3f93d97..0000000 --- a/.github/workflows/coverage-push.yml +++ /dev/null @@ -1,47 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push -name: "Coverage: Push" - -on: - push: - branches: [dev, main] - -env: - CORE_VERSION: dev - -jobs: - coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Set up Go - uses: actions/setup-go@v6 - with: - go-version-file: 'go.mod' - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev - - - name: Build core CLI - run: | - go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core . - core --version - - - name: Generate code - run: go generate ./internal/cmd/updater/... - - - name: Run coverage - run: core go cov - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - - name: Upload coverage report - uses: actions/upload-artifact@v6 - with: - name: coverage-report - path: coverage.txt diff --git a/.github/workflows/pr-build-manual.yml b/.github/workflows/pr-build-manual.yml deleted file mode 100644 index 2c02cfb..0000000 --- a/.github/workflows/pr-build-manual.yml +++ /dev/null @@ -1,89 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch -name: "PR Build: Manual" - -on: - workflow_dispatch: - inputs: - pr_number: - description: 'PR number to build' - required: true - type: number - -permissions: - contents: write - pull-requests: read - -env: - NEXT_VERSION: "0.0.4" - -jobs: - build: - strategy: - matrix: - include: - - os: ubuntu-latest - platform: linux/amd64 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v6 - - - name: Build - uses: host-uk/build@v3 - with: - build-name: core - build-platform: ${{ matrix.platform }} - build: true - package: true - sign: false - - draft-release: - needs: build - runs-on: ubuntu-latest - env: - PR_NUM: ${{ inputs.pr_number }} - PR_SHA: ${{ github.sha }} - steps: - - uses: actions/checkout@v6 - - - name: Download artifacts - uses: actions/download-artifact@v7 - with: - path: dist - merge-multiple: true - - - name: Prepare release files - run: | - mkdir -p release - cp dist/* release/ 2>/dev/null || true - ls -la release/ - - - name: Create draft release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - TAG="v${{ env.NEXT_VERSION }}.pr.${PR_NUM}.bid.${{ github.run_id }}" - - # Delete existing draft for this PR if it exists - gh release delete "$TAG" -y 2>/dev/null || true - git push origin ":refs/tags/$TAG" 2>/dev/null || true - - gh release create "$TAG" \ - --title "Draft: PR #${PR_NUM}" \ - --notes "Draft build for PR #${PR_NUM}. - - **Version:** $TAG - **PR:** #${PR_NUM} - **Commit:** ${PR_SHA} - **Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC') - **Run:** ${{ github.run_id }} - - ## Channel: Draft - - This is a draft build for testing PR changes before merge. - Not intended for production use. - - Build artifacts available for download and testing. - " \ - --draft \ - --prerelease \ - release/* diff --git a/.github/workflows/pr-build-pull-request.yml b/.github/workflows/pr-build-pull-request.yml deleted file mode 100644 index 66ec7c6..0000000 --- a/.github/workflows/pr-build-pull-request.yml +++ /dev/null @@ -1,89 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request -name: "PR Build: Pull Request" - -on: - pull_request: - types: [opened, synchronize, reopened] - -permissions: - contents: write - pull-requests: read - -env: - NEXT_VERSION: "0.0.4" - -jobs: - build: - # Only build if PR is from the same repo (not forks) - if: github.event.pull_request.head.repo.full_name == github.repository - strategy: - matrix: - include: - - os: ubuntu-latest - platform: linux/amd64 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v6 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: Build - uses: host-uk/build@v3 - with: - build-name: core - build-platform: ${{ matrix.platform }} - build: true - package: true - sign: false - - draft-release: - needs: build - runs-on: ubuntu-latest - env: - PR_NUM: ${{ github.event.pull_request.number }} - PR_SHA: ${{ github.event.pull_request.head.sha }} - steps: - - uses: actions/checkout@v6 - - - name: Download artifacts - uses: actions/download-artifact@v7 - with: - path: dist - merge-multiple: true - - - name: Prepare release files - run: | - mkdir -p release - cp dist/* release/ 2>/dev/null || true - ls -la release/ - - - name: Create draft release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - TAG="v${{ env.NEXT_VERSION }}.pr.${PR_NUM}.bid.${{ github.run_id }}" - - # Delete existing draft for this PR if it exists - gh release delete "$TAG" -y 2>/dev/null || true - git push origin ":refs/tags/$TAG" 2>/dev/null || true - - gh release create "$TAG" \ - --title "Draft: PR #${PR_NUM}" \ - --notes "Draft build for PR #${PR_NUM}. - - **Version:** $TAG - **PR:** #${PR_NUM} - **Commit:** ${PR_SHA} - **Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC') - **Run:** ${{ github.run_id }} - - ## Channel: Draft - - This is a draft build for testing PR changes before merge. - Not intended for production use. - - Build artifacts available for download and testing. - " \ - --draft \ - --prerelease \ - release/*