Skip to content
Merged

dev #324

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
22 changes: 18 additions & 4 deletions .github/workflows/build-all-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
# For workflow_call: checkout the version tag created by release.yml
# For tag push: checkout the pushed tag (github.ref)
# For workflow_dispatch: checkout the specified tag or default branch
ref: ${{ inputs.version && format('v{0}', inputs.version) || github.ref }}
Comment on lines +75 to +79

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Respect workflow_dispatch tag during build checkout

For manual runs (workflow_dispatch) the workflow defines an input named tag, but the build checkout still uses inputs.version && format('v{0}', inputs.version) || github.ref. Because inputs.version is unset in this path, the expression always resolves to github.ref (usually the default branch), so dispatching the workflow with a specific tag builds the wrong revision. This can lead to publishing binaries that don’t match the requested tag.

Useful? React with 👍 / 👎.


- name: Set zig suffix for cache key
if: matrix.use-zigbuild
Expand Down Expand Up @@ -405,7 +410,10 @@ jobs:

steps:
- uses: actions/checkout@v4

with:
# Checkout the correct version tag (same as build jobs)
ref: ${{ inputs.version && format('v{0}', inputs.version) || github.ref }}
Comment on lines 412 to +415

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Publish job ignores workflow_dispatch tag input

The publish job’s checkout uses the same inputs.version/github.ref expression as the build job, but workflow_dispatch provides a tag input instead. When the workflow is manually triggered with a tag, this step still checks out the default branch, so package metadata and npm publish operations run against the wrong commit. That can push a release that doesn’t match the tag the user specified.

Useful? React with 👍 / 👎.


- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -525,11 +533,17 @@ jobs:
id: pkg
run: |
NAME=$(node -e "console.log(require('./npx-cli/package.json').name)")
VER=$(node -e "console.log(require('./npx-cli/package.json').version)")
# Use inputs.version if available (from workflow_call), otherwise read from package.json
if [[ -n "${{ inputs.version }}" ]]; then
VER="${{ inputs.version }}"
echo "Using version from workflow input: $VER"
else
VER=$(node -e "console.log(require('./npx-cli/package.json').version)")
echo "Using version from package.json: $VER"
fi
echo "name=$NAME" >> $GITHUB_OUTPUT
echo "version=$VER" >> $GITHUB_OUTPUT
echo "Package: $NAME"
echo "Version: $VER"
echo "Package: $NAME@$VER"

- name: Check if version already published
id: check
Expand Down
27 changes: 18 additions & 9 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ members = [
]

[workspace.package]
version = "0.8.7-rc.39"
version = "0.8.7-rc.40"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

The workspace version is being bumped to 0.8.7-rc.40, but the Cargo.lock file seems to be out of sync. For example, the forge-app package, which uses the workspace version, is listed as 0.8.7-rc.39 in Cargo.lock. Please run cargo check or cargo update to ensure the Cargo.lock file is updated correctly to reflect the new workspace version.

edition = "2024"
license = "MIT"
repository = "https://github.com/namastexlabs/forge-core"
Expand Down
Loading
Loading