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
13 changes: 8 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ jobs:
- name: Sign package with minisign
run: |
if [ ! -f minisign.key.skip ]; then
# Use MINISIGN_PASSPHRASE environment variable for the password
export MINISIGN_ASK_PASS=0
echo "${{ secrets.MINISIGN_PASSPHRASE }}" | minisign -Sm "$PACKAGE_FILE" -s minisign.key -t "create-claude npm package v$VERSION - $(date -u +%Y-%m-%d)"
# Export password as environment variable for minisign
export MINISIGN_PASS="${{ secrets.MINISIGN_PASSPHRASE }}"
minisign -Sm "$PACKAGE_FILE" -s minisign.key -t "create-claude npm package v$VERSION - $(date -u +%Y-%m-%d)"
echo "✓ Successfully signed package with minisign"
else
echo "::warning::Skipping minisign signature generation"
Expand Down Expand Up @@ -132,20 +132,23 @@ jobs:

- name: Sign all SBOMs and attestations
run: |
# Export password as environment variable for minisign
export MINISIGN_PASS="${{ secrets.MINISIGN_PASSPHRASE }}"

# Sign all SBOM files with both minisign and GPG (if keys available)
for sbom in create-claude-$VERSION.sbom.* create-claude-$VERSION.ms-spdx.json; do
if [ -f "$sbom" ]; then
echo "Signing $sbom"
if [ ! -f minisign.key.skip ]; then
echo "${{ secrets.MINISIGN_PASSPHRASE }}" | minisign -Sm "$sbom" -s minisign.key -t "SBOM for create-claude v$VERSION"
minisign -Sm "$sbom" -s minisign.key -t "SBOM for create-claude v$VERSION"
fi
gpg --armor --detach-sign --output "$sbom.asc" "$sbom"
fi
done

# Find and sign any GitHub attestation files
if [ ! -f minisign.key.skip ]; then
find . -name "*.intoto.jsonl" -exec sh -c 'echo "${{ secrets.MINISIGN_PASSPHRASE }}" | minisign -Sm "$1" -s minisign.key -t "SLSA Attestation for create-claude v$VERSION"' _ {} \;
find . -name "*.intoto.jsonl" -exec minisign -Sm {} -s minisign.key -t "SLSA Attestation for create-claude v$VERSION" \;
fi
find . -name "*.intoto.jsonl" -exec gpg --armor --detach-sign --output {}.asc {} \;

Expand Down