Skip to content
Open
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
36 changes: 23 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,46 @@ jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 15
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'workflow_run' &&
github.event.workflow_run.head_branch == 'main'
Comment on lines +21 to +24
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

GitHub Actions workflow_run event github.event.workflow_run.event what does it represent

💡 Result:

In a workflow triggered by on: workflow_run, github.event.workflow_run.event is the name of the GitHub event that triggered the upstream (triggering) workflow run—e.g. push, pull_request, schedule, workflow_dispatch, etc. You can see this event field on workflow run objects (example shows "event": "push"), and the REST API lets you filter workflow runs by that triggering event. [1]

This is not the same as the workflow_run trigger’s activity type (requested, in_progress, completed) used in on.workflow_run.types. [2]

Sources: [1] [3]
References:
[1] (docs.github.com)
[2] (docs.github.com)
[3] (docs.github.com)

Citations:


🏁 Script executed:

cat -n .github/workflows/release.yml | head -40

Repository: adelrodriguez/qte

Length of output: 1219


Remove unsatisfiable condition preventing releases.

At line 23, github.event.workflow_run.event == 'workflow_run' is incorrect. In GitHub Actions, github.event.workflow_run.event contains the name of the event that triggered the upstream workflow (e.g., push, pull_request), never 'workflow_run'. This condition will always fail and prevent this job from running for successful main builds.

Proposed fix
    if: >-
      github.event.workflow_run.conclusion == 'success' &&
-      github.event.workflow_run.event == 'workflow_run' &&
      github.event.workflow_run.head_branch == 'main'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'workflow_run' &&
github.event.workflow_run.head_branch == 'main'
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 21 - 24, The if condition in the
release workflow contains an unsatisfiable clause:
"github.event.workflow_run.event == 'workflow_run'"; remove that clause from the
"if:" expression (or, if you intended to ensure this job only runs when the
workflow is triggered by a workflow_run event, replace that clause with
"github.event_name == 'workflow_run'") so the final condition checks the real
values (e.g., github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main' or include github.event_name ==
'workflow_run' as needed).

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0

# Setup Node.js to enable trusted publishing with OIDC authentication.
# The registry-url configures npm to use GitHub Actions OIDC tokens for
# authentication, eliminating the need for NPM_TOKEN secrets. When
# changeset publish runs npm publish, it will automatically use OIDC
# and generate provenance attestations.
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
ref: ${{ github.event.workflow_run.head_sha }}

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.6

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build project
run: bun run build

# Setup Node.js right before publish so npm auth material only exists
# for the release step that needs trusted publishing.
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
Expand All @@ -55,4 +66,3 @@ jobs:
title: "chore: release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOME: ${{ github.workspace }}
37 changes: 0 additions & 37 deletions .vscode/settings.json

This file was deleted.

131 changes: 131 additions & 0 deletions .zed/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"languages": {
"CSS": {
"format_on_save": "on",
"formatter": [
{
"language_server": {
"name": "oxfmt"
}
}
]
},
"HTML": {
"format_on_save": "on",
"formatter": [
{
"language_server": {
"name": "oxfmt"
}
}
]
},
"JSON": {
"format_on_save": "on",
"formatter": [
{
"language_server": {
"name": "oxfmt"
}
}
]
},
"JSONC": {
"format_on_save": "on",
"formatter": [
{
"language_server": {
"name": "oxfmt"
}
}
]
},
"JavaScript": {
"format_on_save": "on",
"formatter": [
{
"language_server": {
"name": "oxfmt"
}
},
{
"code_action": "source.fixAll.oxc"
}
]
},
"MDX": {
"format_on_save": "on",
"formatter": [
{
"language_server": {
"name": "oxfmt"
}
}
]
},
"Markdown": {
"format_on_save": "on",
"formatter": [
{
"language_server": {
"name": "oxfmt"
}
}
]
},
"TSX": {
"format_on_save": "on",
"formatter": [
{
"language_server": {
"name": "oxfmt"
}
}
]
},
"TypeScript": {
"format_on_save": "on",
"formatter": [
{
"language_server": {
"name": "oxfmt"
}
}
]
},
"YAML": {
"format_on_save": "on",
"formatter": [
{
"language_server": {
"name": "oxfmt"
}
}
]
}
},
"lsp": {
"oxfmt": {
"initialization_options": {
"settings": {
"configPath": null,
"fmt.experimental": true,
"run": "onSave",
"typeAware": false,
"unusedDisableDirectives": false
}
}
},
"oxlint": {
"initialization_options": {
"settings": {
"configPath": null,
"fixKind": "safe_fix",
"run": "onType",
"typeAware": true,
"unusedDisableDirectives": "deny"
}
}
}
}
}
Loading
Loading