From 47a6463488cf27f6c56b9fc30853f0d31e9bc842 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:38:17 +0000 Subject: [PATCH 1/2] Initial plan From 02e96779fc2135d00ad0f1fe1b7164564e396236 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:55:39 +0000 Subject: [PATCH 2/2] Update release.md to call sync-actions workflow after pushing tag and before creating release Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/release.lock.yml | 65 ++++++++++++++++++++++++++---- .github/workflows/release.md | 61 ++++++++++++++++++++++++---- 2 files changed, 111 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.lock.yml b/.github/workflows/release.lock.yml index 8ce05dc0eeb..fb1590e4ae5 100644 --- a/.github/workflows/release.lock.yml +++ b/.github/workflows/release.lock.yml @@ -23,7 +23,7 @@ # # Build, test, and release gh-aw extension, then generate and prepend release highlights # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"4b2b1455692142cdb61d59c9a0979e84af7b5adf88b385d7f58bf26654945b1c"} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"3155b8361ec225308d2372dc9c641de39df1a977eddec354f111ed129943c21e"} name: "Release" "on": @@ -1221,20 +1221,15 @@ jobs: const { main } = require('/opt/gh-aw/actions/check_membership.cjs'); await main(); - release: + push_tag: needs: - activation - config - pre_activation runs-on: ubuntu-latest permissions: - attestations: write contents: write - id-token: write - packages: write - outputs: - release_id: ${{ steps.get_release.outputs.release_id }} steps: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -1275,6 +1270,51 @@ jobs: load: false platforms: linux/amd64 push: false + - name: Upload release binaries + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 + with: + name: release-binaries-${{ needs.config.outputs.release_tag }} + path: dist/ + retention-days: 1 + + release: + needs: + - activation + - config + - pre_activation + - sync_actions + runs-on: ubuntu-latest + permissions: + attestations: write + contents: write + id-token: write + packages: write + + outputs: + release_id: ${{ steps.get_release.outputs.release_id }} + steps: + - name: Verify tag exists in gh-aw-actions + run: | + echo "Verifying tag $RELEASE_TAG exists in github/gh-aw-actions..." + if gh api "repos/github/gh-aw-actions/git/refs/tags/$RELEASE_TAG" --jq '.ref' > /dev/null 2>&1; then + echo "✓ Tag $RELEASE_TAG exists in github/gh-aw-actions" + else + echo "Error: Tag $RELEASE_TAG not found in github/gh-aw-actions after sync" + exit 1 + fi + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASE_TAG: ${{ needs.config.outputs.release_tag }} + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + persist-credentials: true + - name: Download release binaries + uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 + with: + name: release-binaries-${{ needs.config.outputs.release_tag }} + path: dist/ - name: Create GitHub release id: get_release run: | @@ -1436,3 +1476,14 @@ jobs: path: /tmp/safe-output-items.jsonl if-no-files-found: warn + sync_actions: + needs: + - activation + - config + - pre_activation + - push_tag + uses: github/gh-aw-actions/.github/workflows/sync-actions.yml@main + with: + ref: ${{ needs.config.outputs.release_tag }} + secrets: inherit + diff --git a/.github/workflows/release.md b/.github/workflows/release.md index 4e55efe719f..e45e3a17189 100644 --- a/.github/workflows/release.md +++ b/.github/workflows/release.md @@ -143,23 +143,18 @@ jobs: core.setOutput('release_tag', releaseTag); console.log(`✓ Release tag: ${releaseTag}`); - release: + push_tag: needs: ["pre_activation", "activation", "config"] runs-on: ubuntu-latest permissions: contents: write - packages: write - id-token: write - attestations: write - outputs: - release_id: ${{ steps.get_release.outputs.release_id }} steps: - name: Checkout repository uses: actions/checkout@v6.0.2 with: fetch-depth: 0 persist-credentials: true - + - name: Create or update tag env: RELEASE_TAG: ${{ needs.config.outputs.release_tag }} @@ -170,7 +165,7 @@ jobs: git tag "$RELEASE_TAG" git push origin "$RELEASE_TAG" echo "✓ Tag created: $RELEASE_TAG" - + - name: Setup Go uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 with: @@ -199,6 +194,56 @@ jobs: BINARY=dist/linux-amd64 cache-from: type=gha + - name: Upload release binaries + uses: actions/upload-artifact@v7 + with: + name: release-binaries-${{ needs.config.outputs.release_tag }} + path: dist/ + retention-days: 1 + + sync_actions: + needs: ["pre_activation", "activation", "config", "push_tag"] + uses: github/gh-aw-actions/.github/workflows/sync-actions.yml@main + with: + ref: ${{ needs.config.outputs.release_tag }} + secrets: inherit + + release: + needs: ["pre_activation", "activation", "config", "sync_actions"] + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + id-token: write + attestations: write + outputs: + release_id: ${{ steps.get_release.outputs.release_id }} + steps: + - name: Verify tag exists in gh-aw-actions + env: + RELEASE_TAG: ${{ needs.config.outputs.release_tag }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "Verifying tag $RELEASE_TAG exists in github/gh-aw-actions..." + if gh api "repos/github/gh-aw-actions/git/refs/tags/$RELEASE_TAG" --jq '.ref' > /dev/null 2>&1; then + echo "✓ Tag $RELEASE_TAG exists in github/gh-aw-actions" + else + echo "Error: Tag $RELEASE_TAG not found in github/gh-aw-actions after sync" + exit 1 + fi + + - name: Checkout repository + uses: actions/checkout@v6.0.2 + with: + fetch-depth: 0 + persist-credentials: true + + - name: Download release binaries + uses: actions/download-artifact@v8.0.0 + with: + name: release-binaries-${{ needs.config.outputs.release_tag }} + path: dist/ + - name: Create GitHub release id: get_release env: