-
Notifications
You must be signed in to change notification settings - Fork 0
ci: refresh GitHub Actions runtimes #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,12 +21,12 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| is_prerelease: ${{ steps.meta.outputs.is_prerelease }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| npm_dist_tag: ${{ steps.meta.outputs.npm_dist_tag }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ref: ${{ github.ref_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Setup Node 22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-node@v6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| node-version: "22" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cache: npm | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -135,12 +135,12 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| package_name: ${{ steps.pkg.outputs.name }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| version: ${{ steps.pkg.outputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ref: ${{ needs.verify.outputs.tag }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Setup Node 22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-node@v6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| node-version: "22" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cache: npm | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -158,7 +158,23 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "name=$(node -p "require('./package.json').name")" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "version=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Skip if npm version already exists | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: npm_exists | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PACKAGE="${{ steps.pkg.outputs.name }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VERSION="${{ steps.pkg.outputs.version }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if npm view "${PACKAGE}@${VERSION}" version >/dev/null 2>&1; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "::warning::npm version ${PACKAGE}@${VERSION} already exists; skipping immutable publish." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "skip=true" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "skip=false" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Publish npm (retry x3) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: ${{ steps.npm_exists.outputs.skip != 'true' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: ./.github/actions/retry | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| attempts: "3" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -175,20 +191,59 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| environment: jsr | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue-on-error: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ref: ${{ needs.verify.outputs.tag }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Setup Node 22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-node@v6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| node-version: "22" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cache: npm | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: npm ci | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Read JSR metadata | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: jsr_pkg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NAME=$(node -p "require('./jsr.json').name") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VERSION=$(node -p "require('./jsr.json').version") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NPM_NAME=$(node - <<'NODE' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const name = require('./jsr.json').name; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!name.startsWith('@')) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| throw new Error(`Unsupported unscoped JSR package name: ${name}`); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const [scope, pkg] = name.slice(1).split('/'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!scope || !pkg) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| throw new Error(`Unsupported JSR package name: ${name}`); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| process.stdout.write(`@jsr/${scope}__${pkg}`); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NODE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "name=$NAME" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "npm_name=$NPM_NAME" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Skip if JSR version already exists | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: jsr_exists | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PACKAGE="${{ steps.jsr_pkg.outputs.npm_name }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VERSION="${{ steps.jsr_pkg.outputs.version }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if npm view "${PACKAGE}@${VERSION}" version --registry=https://npm.jsr.io >/dev/null 2>&1; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "::warning::JSR version ${{ steps.jsr_pkg.outputs.name }}@${VERSION} already exists; skipping immutable publish." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "skip=true" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "skip=false" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Publish JSR (retry x3) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: ${{ steps.jsr_exists.outputs.skip != 'true' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: ./.github/actions/retry | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| attempts: "3" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -220,13 +275,24 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Create / update release | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: softprops/action-gh-release@v2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tag_name: ${{ needs.verify.outputs.tag }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| prerelease: ${{ needs.verify.outputs.is_prerelease == 'true' }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| generate_release_notes: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| append_body: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| body_path: RELEASE_SUMMARY.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GH_TOKEN: ${{ github.token }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TAG: ${{ needs.verify.outputs.tag }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IS_PRERELEASE: ${{ needs.verify.outputs.is_prerelease }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if gh release view "$TAG" >/dev/null 2>&1; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "::warning::GitHub Release $TAG already exists; skipping immutable release update." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SUMMARY=$(cat RELEASE_SUMMARY.md) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| args=(release create "$TAG" --generate-notes --notes "$SUMMARY") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ "$IS_PRERELEASE" == "true" ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| args+=(--prerelease) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gh "${args[@]}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+278
to
+295
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's examine the full github_release job and its context
cat -n .github/workflows/release.yml | head -350 | tail -100Repository: git-stunts/git-warp Length of output: 4204 🏁 Script executed: # Search for the github_release job definition to see the full context
grep -n "github_release:" .github/workflows/release.yml -A 30Repository: git-stunts/git-warp Length of output: 1146 🏁 Script executed: # Check if there are other jobs in this workflow that reference repository checkout
grep -n "uses: actions/checkout" .github/workflows/release.ymlRepository: git-stunts/git-warp Length of output: 175 🌐 Web query:
💡 Result:
Examples (no checkout needed): # Option A: pass repo explicitly
gh release view v1.2.3 --repo OWNER/REPO
gh release view --repo OWNER/REPO # shows latest release if no tag is given[1] # Option B: set repo via environment variable
export GH_REPO=OWNER/REPO
gh release view v1.2.3
gh release view # latest release[2] If you’re in CI / a clean environment, you may also need to provide auth via 🌐 Web query:
💡 Result:
How
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| TAG: ${{ needs.verify.outputs.tag }} | |
| IS_PRERELEASE: ${{ needs.verify.outputs.is_prerelease }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if gh release view "$TAG" >/dev/null 2>&1; then | |
| echo "::warning::GitHub Release $TAG already exists; skipping immutable release update." | |
| else | |
| SUMMARY=$(cat RELEASE_SUMMARY.md) | |
| args=(release create "$TAG" --generate-notes --notes "$SUMMARY") | |
| if [[ "$IS_PRERELEASE" == "true" ]]; then | |
| args+=(--prerelease) | |
| fi | |
| gh "${args[@]}" | |
| fi | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| TAG: ${{ needs.verify.outputs.tag }} | |
| IS_PRERELEASE: ${{ needs.verify.outputs.is_prerelease }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if gh release view "$TAG" --repo "$GH_REPO" >/dev/null 2>&1; then | |
| echo "::warning::GitHub Release $TAG already exists; skipping immutable release update." | |
| else | |
| SUMMARY=$(cat RELEASE_SUMMARY.md) | |
| args=(release create "$TAG" --repo "$GH_REPO" --generate-notes --notes "$SUMMARY") | |
| if [[ "$IS_PRERELEASE" == "true" ]]; then | |
| args+=(--prerelease) | |
| fi | |
| gh "${args[@]}" | |
| fi |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/release.yml around lines 278 - 295, Add an explicit
repository variable and pass it to the gh commands: add GH_REPO: ${{
github.repository }} to the env block (alongside GH_TOKEN, TAG, IS_PRERELEASE),
and update both gh invocations — the gh release view "$TAG" check and the gh
release create invocation built in the args array (which reads
RELEASE_SUMMARY.md into SUMMARY and appends --prerelease when IS_PRERELEASE is
true) — to include --repo "$GH_REPO" so the commands run outside a checked-out
repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle
jsr.jsoncin the publish job too.The verify job accepts
jsr.jsonorjsr.jsonc, but this step hardcodesrequire('./jsr.json'). If the repo keeps JSR metadata injsr.jsonc, verify passes andpublish_jsrfails here before the immutable-skip check runs.🤖 Prompt for AI Agents