From 846617cf625513e83004b652f9e030261668d092 Mon Sep 17 00:00:00 2001 From: konard Date: Tue, 13 Jan 2026 13:03:13 +0100 Subject: [PATCH 1/4] Initial commit with task details Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/link-foundation/links-notation/issues/192 --- CLAUDE.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..254b44c --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +Issue to solve: https://github.com/link-foundation/links-notation/issues/192 +Your prepared branch: issue-192-3568aae3e63c +Your prepared working directory: /tmp/gh-issue-solver-1768305791874 + +Proceed. From 3dcb1bb8c43d853899bfd64f3abf9aa178c18b4e Mon Sep 17 00:00:00 2001 From: konard Date: Tue, 13 Jan 2026 13:06:37 +0100 Subject: [PATCH 2/4] Fix Java and Go package publishing and CI/CD - Fixed Java Maven Central publishing by improving GPG key import - Moved from setup-java's gpg-private-key parameter to manual import - Added explicit GPG key listing for debugging - This resolves the "No secret key" error that was causing publishing to fail - Added Go package publishing workflow - Implemented publishRelease job that creates GitHub releases - Added automatic Git tag creation for Go modules (format: go_X.Y.Z) - Included installation instructions in release notes - Updated Java package version from 0.1.0 to 0.13.0 to match other language implementations Co-Authored-By: Claude Sonnet 4.5 --- .github/workflows/go.yml | 82 ++++++++++++++++++++++++++++++++++++++ .github/workflows/java.yml | 6 ++- java/pom.xml | 2 +- 3 files changed, 87 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4e1d5de..246b98f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -95,3 +95,85 @@ jobs: files: go/coverage.out flags: go fail_ci_if_error: false + + publishRelease: + runs-on: ubuntu-latest + timeout-minutes: 10 + needs: [test, findChangedGoFiles] + if: ${{ needs.findChangedGoFiles.outputs.isGoFilesChanged == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} + steps: + - uses: actions/checkout@v6 + with: + submodules: true + fetch-depth: 0 + - name: Setup Go + uses: actions/setup-go@v6 + with: + go-version: '1.21' + - name: Extract version from go.mod + id: version-extract + run: | + # For Go modules, version is typically managed through git tags + # We'll read the module path and create a version based on semantic versioning + MODULE_PATH=$(grep "^module " go.mod | awk '{print $2}') + echo "module_path=$MODULE_PATH" >> $GITHUB_OUTPUT + + # Get the latest tag for Go module (if any) + LATEST_TAG=$(git describe --tags --match "go_*" --abbrev=0 2>/dev/null || echo "") + if [ -z "$LATEST_TAG" ]; then + # If no tag exists, use version 0.13.0 to match other packages + PACKAGE_VERSION="0.13.0" + else + # Extract version from tag (format: go_X.Y.Z) + PACKAGE_VERSION="${LATEST_TAG#go_}" + fi + + echo "version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT + echo "Go module: $MODULE_PATH" + echo "Version: $PACKAGE_VERSION" + - name: Check if GitHub release already exists + id: release-check + run: | + PACKAGE_VERSION="${{ steps.version-extract.outputs.version }}" + TAG_NAME="go_$PACKAGE_VERSION" + echo "Checking if release $TAG_NAME already exists" + + # Check if release exists + if gh release view "$TAG_NAME" >/dev/null 2>&1; then + echo "Release $TAG_NAME already exists" + echo "should_create_release=false" >> $GITHUB_OUTPUT + else + echo "Release $TAG_NAME does not exist" + echo "should_create_release=true" >> $GITHUB_OUTPUT + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create GitHub release and tag + if: steps.release-check.outputs.should_create_release == 'true' + run: | + PACKAGE_VERSION="${{ steps.version-extract.outputs.version }}" + MODULE_PATH="${{ steps.version-extract.outputs.module_path }}" + TAG_NAME="go_${PACKAGE_VERSION}" + + # Create and push tag + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git tag -a "$TAG_NAME" -m "Go module release $PACKAGE_VERSION" + git push origin "$TAG_NAME" + + # Create GitHub release + gh release create "$TAG_NAME" \ + --title "[Go] $PACKAGE_VERSION" \ + --notes "Go module release for \`$MODULE_PATH\` + +## Installation + +\`\`\`bash +go get $MODULE_PATH@$TAG_NAME +\`\`\` + +## Documentation + +https://pkg.go.dev/$MODULE_PATH@$TAG_NAME" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index c9df843..76eff0b 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -121,8 +121,10 @@ jobs: server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Import GPG key + run: | + echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import + gpg --list-secret-keys --keyid-format LONG - name: Check if version already published id: version-check run: | diff --git a/java/pom.xml b/java/pom.xml index c81a5cd..f1fc2f2 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -6,7 +6,7 @@ io.github.link-foundation links-notation - 0.1.0 + 0.13.0 jar Links Notation From e23d4ec66e78aa83c401051c983e7d27caee87d0 Mon Sep 17 00:00:00 2001 From: konard Date: Tue, 13 Jan 2026 13:07:23 +0100 Subject: [PATCH 3/4] Fix Go workflow YAML indentation in release notes --- .github/workflows/go.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 246b98f..2a48420 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -166,14 +166,14 @@ jobs: --title "[Go] $PACKAGE_VERSION" \ --notes "Go module release for \`$MODULE_PATH\` -## Installation + ## Installation -\`\`\`bash -go get $MODULE_PATH@$TAG_NAME -\`\`\` + \`\`\`bash + go get $MODULE_PATH@$TAG_NAME + \`\`\` -## Documentation + ## Documentation -https://pkg.go.dev/$MODULE_PATH@$TAG_NAME" + https://pkg.go.dev/$MODULE_PATH@$TAG_NAME" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d69d427b51a91037d764509899ca1629c8460495 Mon Sep 17 00:00:00 2001 From: konard Date: Tue, 13 Jan 2026 13:10:33 +0100 Subject: [PATCH 4/4] Remove CLAUDE.md file --- CLAUDE.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 254b44c..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -Issue to solve: https://github.com/link-foundation/links-notation/issues/192 -Your prepared branch: issue-192-3568aae3e63c -Your prepared working directory: /tmp/gh-issue-solver-1768305791874 - -Proceed.