diff --git a/.github/workflows/publish-gpr.yml b/.github/workflows/publish-gpr.yml index 15130d3..5a41c11 100644 --- a/.github/workflows/publish-gpr.yml +++ b/.github/workflows/publish-gpr.yml @@ -2,6 +2,11 @@ name: Publish to GitHub Packages on: workflow_dispatch: + inputs: + tag: + description: 'Release tag to publish (e.g., @cometloop/safe@0.1.0)' + required: true + type: string jobs: publish-gpr: @@ -14,7 +19,7 @@ jobs: - name: Parse tag id: parse run: | - TAG="${{ github.ref_name }}" + TAG="${{ inputs.tag }}" # Extract package name and version from tag like @cometloop/safe@0.1.0 NAME="${TAG%@*}" VERSION="${TAG##*@}" @@ -25,6 +30,8 @@ jobs: echo "Publishing ${NAME}@${VERSION} from ${DIR}" - uses: actions/checkout@v4 + with: + ref: ${{ inputs.tag }} - uses: pnpm/action-setup@v4