From cf1a190561b6de351f20452aff8fbbfcab5eaf8a Mon Sep 17 00:00:00 2001 From: yujeong-jeon Date: Thu, 5 Mar 2026 17:11:37 +0900 Subject: [PATCH] ci: remove binary upload workflow and SKIP_COMMIT_HELPER_POSTINSTALL Binaries are now bundled inside platform npm packages, so there is no longer a need to upload assets to GitHub Releases after publish. - Remove release-asset.yaml workflow entirely - Remove upload-assets job and checkCommitHelperGo step from release.yaml - Remove SKIP_COMMIT_HELPER_POSTINSTALL env var from all workflows Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/detect-changed-packages.yml | 1 - .github/workflows/release-asset.yaml | 94 ------------------- .github/workflows/release.yaml | 35 ------- 3 files changed, 130 deletions(-) delete mode 100644 .github/workflows/release-asset.yaml diff --git a/.github/workflows/detect-changed-packages.yml b/.github/workflows/detect-changed-packages.yml index 2515260..ce3a646 100644 --- a/.github/workflows/detect-changed-packages.yml +++ b/.github/workflows/detect-changed-packages.yml @@ -14,7 +14,6 @@ jobs: runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} - SKIP_COMMIT_HELPER_POSTINSTALL: 1 steps: - name: Checkout Repo uses: actions/checkout@v3 diff --git a/.github/workflows/release-asset.yaml b/.github/workflows/release-asset.yaml deleted file mode 100644 index a7d8e67..0000000 --- a/.github/workflows/release-asset.yaml +++ /dev/null @@ -1,94 +0,0 @@ -name: 'upload asset' -description: 'Upload asset for go packages' - -on: - workflow_dispatch: - inputs: - package: - description: 'Package to upload asset' - required: true - default: '@naverpay/commithelper-go' - version: - description: 'Which version to upload asset' - required: true - workflow_call: - inputs: - package: - description: 'Package to upload asset' - required: true - type: string - version: - description: 'Which version to upload asset' - required: true - type: string - -permissions: - contents: write # to create release - -jobs: - release-asset: - runs-on: ubuntu-latest - env: - SKIP_COMMIT_HELPER_POSTINSTALL: 1 - GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: checkoutRepo - uses: actions/checkout@v3 - with: - token: ${{ secrets.ACTION_TOKEN }} - fetch-depth: 0 - - - name: setupGo - uses: actions/setup-go@v4 - with: - go-version: '1.24' - - - name: useNodeJs - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - - name: installCorepack - run: npm install -g corepack@0.31.0 - - - name: enableCorepack - run: corepack enable - - - name: installDependencies - run: pnpm install --frozen-lockfile - - - name: buildNodePackages - run: pnpm build - - - name: buildCrossPlatformBinaries - run: | - cd packages/commithelper-go - mkdir -p dist - # Build for Windows - GOOS=windows GOARCH=amd64 go build -o dist/commithelper-go-windows-amd64.exe main.go - # Build for macOS AMD64 - GOOS=darwin GOARCH=amd64 go build -o dist/commithelper-go-darwin-amd64 main.go - # Build for macOS ARM64 - GOOS=darwin GOARCH=arm64 go build -o dist/commithelper-go-darwin-arm64 main.go - # Build for Linux AMD64 - GOOS=linux GOARCH=amd64 go build -o dist/commithelper-go-linux-amd64 main.go - - - name: Upload release assets - run: | - packageName="${{ inputs.package }}" - packageVersion="${{ inputs.version }}" - releaseTag="$packageName@$packageVersion" - - echo "🔍 Uploading assets for release: $releaseTag" - - gh release upload "$releaseTag" \ - packages/commithelper-go/dist/commithelper-go-windows-amd64.exe \ - packages/commithelper-go/dist/commithelper-go-darwin-amd64 \ - packages/commithelper-go/dist/commithelper-go-darwin-arm64 \ - packages/commithelper-go/dist/commithelper-go-linux-amd64 \ - --clobber - - echo "✅ All assets uploaded successfully!" - env: - GH_TOKEN: ${{ secrets.ACTION_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6043514..4ec1cf2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,10 +37,7 @@ jobs: (github.event_name == 'issue_comment' && needs.get-branch.result == 'success')) outputs: published: ${{ steps.publish_release.outputs.published || steps.publish_canary.outputs.published || steps.publish_rc.outputs.published }} - commithelperGoWillBePublished: ${{ steps.checkCommitHelperGo.outputs.commithelperGoWillBePublished }} - packageVersion: ${{ steps.checkCommitHelperGo.outputs.publishedVersion }} env: - SKIP_COMMIT_HELPER_POSTINSTALL: 1 GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: @@ -121,35 +118,3 @@ jobs: create_release: true env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Check if commithelper-go was published - id: checkCommitHelperGo - if: always() - run: | - echo "publish_release publishedPackages: '${{ steps.publish_release.outputs.publishedPackages }}'" - echo "publish_canary publishedPackages: '${{ steps.publish_canary.outputs.publishedPackages }}'" - echo "publish_rc publishedPackages: '${{ steps.publish_rc.outputs.publishedPackages }}'" - publishedPackages='${{ steps.publish_release.outputs.publishedPackages || steps.publish_canary.outputs.publishedPackages || steps.publish_rc.outputs.publishedPackages }}' - echo "resolved publishedPackages: '$publishedPackages'" - if [ -z "$publishedPackages" ] || [ "$publishedPackages" == "null" ]; then - echo "commithelperGoWillBePublished=false" >> $GITHUB_OUTPUT - else - commithelperGo=$(echo "$publishedPackages" | jq -r '.[] | select(.name == "@naverpay/commithelper-go")') - if [ -n "$commithelperGo" ] && [ "$commithelperGo" != "null" ]; then - echo "commithelperGoWillBePublished=true" >> $GITHUB_OUTPUT - # Extract the actual published version (handles canary/RC versions) - version=$(echo "$commithelperGo" | jq -r '.version') - echo "publishedVersion=$version" >> $GITHUB_OUTPUT - else - echo "commithelperGoWillBePublished=false" >> $GITHUB_OUTPUT - fi - fi - - upload-assets: - needs: release - if: always() && needs.release.outputs.published == 'true' && needs.release.outputs.commithelperGoWillBePublished == 'true' - uses: ./.github/workflows/release-asset.yaml - with: - package: '@naverpay/commithelper-go' - version: ${{ needs.release.outputs.packageVersion }} - secrets: inherit