Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 58 additions & 7 deletions .github/workflows/release.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 53 additions & 8 deletions .github/workflows/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down Expand Up @@ -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
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retention-days: 1 for the uploaded binaries is likely too short now that the workflow can block on sync_actions waiting for a PR to merge/tag to be created. If that takes >24h, the artifact may expire before the release job runs; consider increasing retention (e.g., several days) to match expected sync latency.

Suggested change
retention-days: 1
retention-days: 7

Copilot uses AI. Check for mistakes.

sync_actions:
needs: ["pre_activation", "activation", "config", "push_tag"]
uses: github/gh-aw-actions/.github/workflows/sync-actions.yml@main
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reusable workflow call is pinned to @main. For a release pipeline this reduces reproducibility and creates supply-chain risk (a change on main can alter the release behavior). Prefer pinning to a tag or a specific commit SHA, and updating it intentionally when needed.

Suggested change
uses: github/gh-aw-actions/.github/workflows/sync-actions.yml@main
uses: github/gh-aw-actions/.github/workflows/sync-actions.yml@v1.0.0

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gh api path uses git/refs/tags/..., but the GitHub REST endpoint used elsewhere in this repo is git/ref/tags/... (singular ref). As written, this check is likely to 404 even when the tag exists, causing the release to fail every time.

Suggested change
if gh api "repos/github/gh-aw-actions/git/refs/tags/$RELEASE_TAG" --jq '.ref' > /dev/null 2>&1; then
if gh api "repos/github/gh-aw-actions/git/ref/tags/$RELEASE_TAG" --jq '.ref' > /dev/null 2>&1; then

Copilot uses AI. Check for mistakes.
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:
Expand Down
Loading