Skip to content

Commit 2f50620

Browse files
committed
Release v1.1.6: fix CI failures and Rust formatting
- Fix Go: validate empty pinning DB path in NewSchemaVerificationWorkflow - Fix Rust: cargo fmt formatting issues in core.rs, crypto.rs, main.rs - Fix CI: version grep for var Version (not const) in release-combined - Fix CI: make GitHub Release creation idempotent across all workflows to prevent race condition failures when parallel workflows run - Bump all package versions to 1.1.6
1 parent 008b61b commit 2f50620

19 files changed

Lines changed: 198 additions & 157 deletions

File tree

.github/workflows/release-combined.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
cd ../python
8888
PY_VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)
8989
cd ../go
90-
GO_VERSION=$(grep '^const Version' internal/version/version.go | cut -d'"' -f2)
90+
GO_VERSION=$(grep '^var Version' internal/version/version.go | cut -d'"' -f2)
9191
cd ../rust
9292
RUST_VERSION=$(grep '^version = ' Cargo.toml | cut -d'"' -f2)
9393
if [ "$JS_VERSION" != "$PY_VERSION" ] || [ "$JS_VERSION" != "$GO_VERSION" ] || [ "$JS_VERSION" != "$RUST_VERSION" ]; then

.github/workflows/release-crates.yml

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -214,45 +214,49 @@ jobs:
214214
PRERELEASE="--prerelease"
215215
fi
216216
217-
gh release create ${{ github.ref_name }} \
218-
--title "Release ${{ github.ref_name }}" \
219-
--notes "## Rust Crate Release
220-
221-
Published \`schemapin = \"${{ github.ref_name }}\"\` to crates.io.
222-
223-
### Installation
224-
\`\`\`toml
225-
[dependencies]
226-
schemapin = \"${{ github.ref_name }}\"
227-
\`\`\`
228-
229-
### Usage
230-
\`\`\`rust
231-
use schemapin::crypto::{generate_key_pair, sign_data, verify_signature, calculate_key_id};
232-
233-
fn main() -> Result<(), Box<dyn std::error::Error>> {
234-
// Generate a new key pair
235-
let key_pair = generate_key_pair()?;
236-
237-
// Sign some data
238-
let data = b\"Hello, World!\";
239-
let signature = sign_data(&key_pair.private_key_pem, data)?;
240-
241-
// Verify the signature
242-
let is_valid = verify_signature(&key_pair.public_key_pem, data, &signature)?;
243-
assert!(is_valid);
244-
245-
// Calculate key ID
246-
let key_id = calculate_key_id(&key_pair.public_key_pem)?;
247-
println!(\"Key ID: {}\", key_id);
248-
249-
Ok(())
250-
}
251-
\`\`\`
252-
253-
### Changes
254-
See [CHANGELOG.md](./CHANGELOG.md) for details." \
255-
$PRERELEASE
217+
if gh release view ${{ github.ref_name }} &>/dev/null; then
218+
echo "GitHub Release ${{ github.ref_name }} already exists, skipping creation"
219+
else
220+
gh release create ${{ github.ref_name }} \
221+
--title "Release ${{ github.ref_name }}" \
222+
--notes "## Rust Crate Release
223+
224+
Published \`schemapin = \"${{ github.ref_name }}\"\` to crates.io.
225+
226+
### Installation
227+
\`\`\`toml
228+
[dependencies]
229+
schemapin = \"${{ github.ref_name }}\"
230+
\`\`\`
231+
232+
### Usage
233+
\`\`\`rust
234+
use schemapin::crypto::{generate_key_pair, sign_data, verify_signature, calculate_key_id};
235+
236+
fn main() -> Result<(), Box<dyn std::error::Error>> {
237+
// Generate a new key pair
238+
let key_pair = generate_key_pair()?;
239+
240+
// Sign some data
241+
let data = b\"Hello, World!\";
242+
let signature = sign_data(&key_pair.private_key_pem, data)?;
243+
244+
// Verify the signature
245+
let is_valid = verify_signature(&key_pair.public_key_pem, data, &signature)?;
246+
assert!(is_valid);
247+
248+
// Calculate key ID
249+
let key_id = calculate_key_id(&key_pair.public_key_pem)?;
250+
println!(\"Key ID: {}\", key_id);
251+
252+
Ok(())
253+
}
254+
\`\`\`
255+
256+
### Changes
257+
See [CHANGELOG.md](./CHANGELOG.md) for details." \
258+
$PRERELEASE
259+
fi
256260
env:
257261
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
258262

.github/workflows/release-go.yml

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -133,38 +133,45 @@ jobs:
133133
PRERELEASE="--prerelease"
134134
fi
135135
136-
gh release create ${{ github.ref_name }} \
137-
--title "Release ${{ github.ref_name }}" \
138-
--notes "## Go Package Release
139-
140-
SchemaPin Go implementation with CLI tools.
141-
142-
### Installation
143-
144-
#### Using Go Install
145-
\`\`\`bash
146-
go install github.com/ThirdKeyAi/schemapin/go/cmd/...@${{ github.ref_name }}
147-
\`\`\`
148-
149-
#### Binary Downloads
150-
Download pre-built binaries for your platform:
151-
- Linux (amd64): [schemapin-go-linux-amd64.tar.gz](https://github.com/thirdkey/schemapin/releases/download/${{ github.ref_name }}/schemapin-go-linux-amd64.tar.gz)
152-
- Linux (arm64): [schemapin-go-linux-arm64.tar.gz](https://github.com/thirdkey/schemapin/releases/download/${{ github.ref_name }}/schemapin-go-linux-arm64.tar.gz)
153-
- macOS (amd64): [schemapin-go-darwin-amd64.tar.gz](https://github.com/thirdkey/schemapin/releases/download/${{ github.ref_name }}/schemapin-go-darwin-amd64.tar.gz)
154-
- macOS (arm64): [schemapin-go-darwin-arm64.tar.gz](https://github.com/thirdkey/schemapin/releases/download/${{ github.ref_name }}/schemapin-go-darwin-arm64.tar.gz)
155-
- Windows (amd64): [schemapin-go-windows-amd64.zip](https://github.com/thirdkey/schemapin/releases/download/${{ github.ref_name }}/schemapin-go-windows-amd64.zip)
156-
157-
### CLI Tools
158-
\`\`\`bash
159-
schemapin-keygen --help
160-
schemapin-sign --help
161-
schemapin-verify --help
162-
\`\`\`
163-
164-
### Changes
165-
See [CHANGELOG.md](./CHANGELOG.md) for details." \
166-
go/dist/*.tar.gz go/dist/*.zip go/dist/checksums.txt \
167-
$PRERELEASE
136+
if gh release view ${{ github.ref_name }} &>/dev/null; then
137+
echo "GitHub Release ${{ github.ref_name }} already exists, uploading assets"
138+
gh release upload ${{ github.ref_name }} \
139+
go/dist/*.tar.gz go/dist/*.zip go/dist/checksums.txt \
140+
--clobber
141+
else
142+
gh release create ${{ github.ref_name }} \
143+
--title "Release ${{ github.ref_name }}" \
144+
--notes "## Go Package Release
145+
146+
SchemaPin Go implementation with CLI tools.
147+
148+
### Installation
149+
150+
#### Using Go Install
151+
\`\`\`bash
152+
go install github.com/ThirdKeyAi/schemapin/go/cmd/...@${{ github.ref_name }}
153+
\`\`\`
154+
155+
#### Binary Downloads
156+
Download pre-built binaries for your platform:
157+
- Linux (amd64): [schemapin-go-linux-amd64.tar.gz](https://github.com/thirdkey/schemapin/releases/download/${{ github.ref_name }}/schemapin-go-linux-amd64.tar.gz)
158+
- Linux (arm64): [schemapin-go-linux-arm64.tar.gz](https://github.com/thirdkey/schemapin/releases/download/${{ github.ref_name }}/schemapin-go-linux-arm64.tar.gz)
159+
- macOS (amd64): [schemapin-go-darwin-amd64.tar.gz](https://github.com/thirdkey/schemapin/releases/download/${{ github.ref_name }}/schemapin-go-darwin-amd64.tar.gz)
160+
- macOS (arm64): [schemapin-go-darwin-arm64.tar.gz](https://github.com/thirdkey/schemapin/releases/download/${{ github.ref_name }}/schemapin-go-darwin-arm64.tar.gz)
161+
- Windows (amd64): [schemapin-go-windows-amd64.zip](https://github.com/thirdkey/schemapin/releases/download/${{ github.ref_name }}/schemapin-go-windows-amd64.zip)
162+
163+
### CLI Tools
164+
\`\`\`bash
165+
schemapin-keygen --help
166+
schemapin-sign --help
167+
schemapin-verify --help
168+
\`\`\`
169+
170+
### Changes
171+
See [CHANGELOG.md](./CHANGELOG.md) for details." \
172+
go/dist/*.tar.gz go/dist/*.zip go/dist/checksums.txt \
173+
$PRERELEASE
174+
fi
168175
env:
169176
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170177

.github/workflows/release-npm.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,24 @@ jobs:
142142
PRERELEASE="--prerelease"
143143
fi
144144
145-
gh release create ${{ github.ref_name }} \
146-
--title "Release ${{ github.ref_name }}" \
147-
--notes "## npm Package Release
148-
149-
Published \`schemapin@${{ github.ref_name }}\` to npm registry.
150-
151-
### Installation
152-
\`\`\`bash
153-
npm install schemapin
154-
\`\`\`
155-
156-
### Changes
157-
See [CHANGELOG.md](./CHANGELOG.md) for details." \
158-
$PRERELEASE
145+
if gh release view ${{ github.ref_name }} &>/dev/null; then
146+
echo "GitHub Release ${{ github.ref_name }} already exists, skipping creation"
147+
else
148+
gh release create ${{ github.ref_name }} \
149+
--title "Release ${{ github.ref_name }}" \
150+
--notes "## npm Package Release
151+
152+
Published \`schemapin@${{ github.ref_name }}\` to npm registry.
153+
154+
### Installation
155+
\`\`\`bash
156+
npm install schemapin
157+
\`\`\`
158+
159+
### Changes
160+
See [CHANGELOG.md](./CHANGELOG.md) for details." \
161+
$PRERELEASE
162+
fi
159163
env:
160164
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
161165

.github/workflows/release-pypi.yml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -206,27 +206,31 @@ jobs:
206206
PRERELEASE="--prerelease"
207207
fi
208208
209-
gh release create ${{ github.ref_name }} \
210-
--title "Release ${{ github.ref_name }}" \
211-
--notes "## PyPI Package Release
212-
213-
Published \`schemapin==${{ github.ref_name }}\` to PyPI.
214-
215-
### Installation
216-
\`\`\`bash
217-
pip install schemapin
218-
\`\`\`
219-
220-
### CLI Tools
221-
\`\`\`bash
222-
schemapin-keygen --help
223-
schemapin-sign --help
224-
schemapin-verify --help
225-
\`\`\`
226-
227-
### Changes
228-
See [CHANGELOG.md](./CHANGELOG.md) for details." \
229-
$PRERELEASE
209+
if gh release view ${{ github.ref_name }} &>/dev/null; then
210+
echo "GitHub Release ${{ github.ref_name }} already exists, skipping creation"
211+
else
212+
gh release create ${{ github.ref_name }} \
213+
--title "Release ${{ github.ref_name }}" \
214+
--notes "## PyPI Package Release
215+
216+
Published \`schemapin==${{ github.ref_name }}\` to PyPI.
217+
218+
### Installation
219+
\`\`\`bash
220+
pip install schemapin
221+
\`\`\`
222+
223+
### CLI Tools
224+
\`\`\`bash
225+
schemapin-keygen --help
226+
schemapin-sign --help
227+
schemapin-verify --help
228+
\`\`\`
229+
230+
### Changes
231+
See [CHANGELOG.md](./CHANGELOG.md) for details." \
232+
$PRERELEASE
233+
fi
230234
env:
231235
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
232236

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ All notable changes to the SchemaPin project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.1.5] - 2026-02-06
8+
## [1.1.6] - 2026-02-06
9+
10+
### Fixed
11+
12+
- **Go**: `NewSchemaVerificationWorkflow` now validates that pinning database path is not empty
13+
- **Rust**: Fixed `cargo fmt` formatting issues in core and crypto modules
14+
- **CI**: Fixed version consistency check in release-combined workflow (grep for `var Version` not `const Version`)
15+
- **CI**: Fixed GitHub Release race condition where parallel release workflows would fail trying to create duplicate releases
916

1017
### Security
1118

go/internal/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
package version
33

44
// Version is set at build time via ldflags
5-
var Version = "1.1.5"
5+
var Version = "1.1.6"
66

77
// GetVersion returns the current version string
88
func GetVersion() string {

go/pkg/utils/utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ type VerificationResult struct {
8787

8888
// NewSchemaVerificationWorkflow creates a new verification workflow
8989
func NewSchemaVerificationWorkflow(pinningDBPath string) (*SchemaVerificationWorkflow, error) {
90+
if pinningDBPath == "" {
91+
return nil, fmt.Errorf("pinning database path cannot be empty")
92+
}
9093
keyPinning, err := pinning.NewKeyPinning(pinningDBPath, pinning.PinningModeInteractive, nil)
9194
if err != nil {
9295
return nil, fmt.Errorf("failed to initialize key pinning: %w", err)

integration_demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "schemapin-integration-demo",
3-
"version": "1.1.5",
3+
"version": "1.1.6",
44
"description": "Cross-language integration demonstration for SchemaPin",
55
"type": "module",
66
"main": "demo_scenario.js",

javascript/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)