Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
405 changes: 405 additions & 0 deletions .github/workflows/release-go.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Command
name: Release npm (JS & CLI)

on:
issue_comment:
Expand Down Expand Up @@ -101,6 +101,12 @@ jobs:
return;
}

// go/golang packages are handled by release-go.yml — skip silently
const goPackages = ['go', 'golang'];
if (goPackages.includes(packageName)) {
return;
}

const invalidPackage = !allowedPackages.includes(packageName);
const invalidBump = !allowedBumps.includes(releaseType);
const invalidPrerelease = prereleaseTag && !allowedPrereleaseTags.includes(prereleaseTag);
Expand All @@ -109,12 +115,13 @@ jobs:
const message = [
`⚠️ @${actor} I couldn't parse the release command.`,
'',
'Expected format: `!release <cli|js|python> <patch|minor|major> [beta|alpha|rc]`',
'Expected format: `!release <cli|js|python|go> <patch|minor|major> [beta|alpha|rc]`',
'',
'Examples:',
'- `!release cli patch` - stable release',
'- `!release js minor beta` - beta release',
'- `!release python minor` - Python SDK release'
'- `!release python minor` - Python SDK release',
'- `!release go minor` - Go SDK release'
];
await github.rest.issues.createComment({
owner,
Expand Down Expand Up @@ -496,7 +503,7 @@ jobs:
echo " - Provider: GitHub Actions"
echo " - Owner: Phala-Network"
echo " - Repository: phala-cloud"
echo " - Workflow: release-command.yml"
echo " - Workflow: release-npm.yml"
echo " - Environment: (empty)"
echo ""
echo " Actual workflow context:"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
const releaseType = match[2].toLowerCase();
const prereleaseTag = match[3] ? match[3].toLowerCase() : '';

// Only handle python/py - let other packages be handled by release-command.yml
// Only handle python/py - let other packages be handled by release-npm.yml / release-go.yml
if (!allowedPackages.includes(packageName)) {
return;
}
Expand Down
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,23 @@ repos:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
files: ^python/
- repo: local
hooks:
- id: gofmt
name: gofmt
entry: bash -c 'cd go && files=$(gofmt -l .); [ -z "$files" ] || gofmt -l -w $files'
language: system
files: ^go/.*\.go$
pass_filenames: false
- id: govet
name: go vet
entry: bash -c 'cd go && go vet ./...'
language: system
files: ^go/.*\.go$
pass_filenames: false
- id: gotest
name: go test
entry: bash -c 'cd go && go test ./...'
language: system
files: ^go/.*\.go$
pass_filenames: false
Loading
Loading