name: Publish Skill on: workflow_call: inputs: version: required: true type: string secrets: CLAWHUB_TOKEN: required: true workflow_dispatch: inputs: version: description: 'Skill version (e.g. 0.2.0, without v prefix)' required: true env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true permissions: contents: read jobs: publish: name: Publish to ClawHub runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: actions/setup-node@v5 with: node-version: '22' - name: Install ClawHub CLI run: npm i -g clawhub - name: Authenticate run: clawhub login --token "$CLAWHUB_TOKEN" --no-browser env: CLAWHUB_TOKEN: ${{ secrets.CLAWHUB_TOKEN }} - name: Publish skill run: | if [ -n "${{ inputs.version }}" ]; then VERSION="${{ inputs.version }}" elif [ -n "${{ github.event.inputs.version }}" ]; then VERSION="${{ github.event.inputs.version }}" else VERSION=${GITHUB_REF_NAME#v} fi VERSION=${VERSION#v} clawhub publish skills/pinchtab \ --slug pinchtab \ --name "Pinchtab" \ --version "$VERSION" \ --changelog "Release v$VERSION" \ --tags latest