Skip to content
Merged
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
104 changes: 48 additions & 56 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
name: Release

on:
push:
tags:
- "v*"
workflow_dispatch:
push:
tags:
- "v*"
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TERM_COLOR: always

jobs:
permissions:
contents: write
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This still uses actions/checkout@v6, but the PR description says the fix was to downgrade from a non-existent @v6 to @v4. If the intent is to use the current stable checkout action, update this to actions/checkout@v4 (and keep versions consistent across the workflow).

Copilot uses AI. Check for mistakes.
- uses: taiki-e/create-gh-release-action@v1
if: github.event_name != 'workflow_dispatch'
with:
Expand All @@ -31,8 +30,8 @@ jobs:
build:
runs-on: ${{ matrix.os }}
needs: [create-release]
permissions:
contents: write
permissions:
contents: write
strategy:
fail-fast: false
matrix:
Expand All @@ -54,6 +53,10 @@ jobs:
build-tool: cargo
steps:
- uses: actions/checkout@v6
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

actions/checkout@v6 here contradicts the PR description (which says @v6 was replaced with @v4). If @v6 is not intended/valid, switch this job to actions/checkout@v4 as well.

Copilot uses AI. Check for mistakes.
with:
fetch-depth: 0
fetch-tags: true
lfs: false
- uses: Swatinem/rust-cache@v2
with:
shared-key: rust-${{ matrix.target }}
Expand All @@ -67,49 +70,38 @@ jobs:
features: git2/vendored-libgit2,git2/vendored-openssl
dry-run: ${{ github.event_name == 'workflow_dispatch' }}

github_release:
name: Create GitHub Release
needs: [build, publish]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6

- name: Download all artifacts
uses: actions/download-artifact@v4

- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
submod-linux-x86_64/submod
submod-linux-x86_64-musl/submod
submod-windows-x86_64.exe/submod.exe
submod-macos-aarch64/submod
body_path: CHANGELOG.md
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
name: Publish to crates.io
needs: [build]
runs-on: ubuntu-latest
environment: cratesio
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --allow-dirty
name: Publish to crates.io
needs: [build]
runs-on: ubuntu-latest
environment: cratesio
permissions:
contents: read
id-token: write
Comment on lines 73 to +80
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

workflow_dispatch currently triggers real publish/github_release behavior, while the build job uses dry-run for dispatch. If dispatch is intended as a safe dry run, add an if: github.event_name != 'workflow_dispatch' guard (or a manual input) to prevent accidentally publishing to crates.io from a dispatch run.

Copilot uses AI. Check for mistakes.
steps:
- uses: actions/checkout@v6
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This job still uses actions/checkout@v6, but the PR description indicates it should be actions/checkout@v4. Please align this with the intended version (and with other workflows that already use @v4).

Copilot uses AI. Check for mistakes.
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: katyo/publish-crates@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --allow-dirty
ignore-unpublished-changes: true
Comment on lines +86 to +90
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The PR description says crates.io publishing should use a registry token (e.g. registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}), but this still passes secrets.GITHUB_TOKEN via token:. If this workflow is meant to publish to crates.io, update the action inputs to use the correct crates.io secret/input name.

Copilot uses AI. Check for mistakes.

github_release:
name: Publish GitHub Release
needs: [build, publish]
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

On workflow_dispatch, create-release skips creating the draft release and build runs in dry-run mode, but this job will still attempt to publish a GitHub Release. Consider guarding this job with if: github.event_name != 'workflow_dispatch' (or creating the draft release on dispatch) to avoid failures/partial runs.

Suggested change
needs: [build, publish]
needs: [build, publish]
if: github.event_name != 'workflow_dispatch'

Copilot uses AI. Check for mistakes.
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This job still references actions/checkout@v6 despite the PR description stating @v6 should be replaced with @v4. Update to the intended checkout version to avoid unexpected workflow failures.

Copilot uses AI. Check for mistakes.
- name: Publish Release
uses: softprops/action-gh-release@v2
with:
body_path: CHANGELOG.md
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading