fix(container): update oh-my-claude test to match alias ownership change #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Canary | |
| on: | |
| push: | |
| branches: [staging] | |
| paths: ['container/**', 'cli/**'] | |
| workflow_dispatch: | |
| inputs: | |
| package: | |
| description: Which package(s) to publish | |
| type: choice | |
| options: [both, container, cli] | |
| default: both | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| container: ${{ steps.resolve.outputs.container }} | |
| cli: ${{ steps.resolve.outputs.cli }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| if: github.event_name == 'push' | |
| with: | |
| filters: | | |
| container: | |
| - 'container/**' | |
| cli: | |
| - 'cli/**' | |
| - name: Resolve targets | |
| id: resolve | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| PACKAGE="${{ inputs.package }}" | |
| echo "container=$( [ "$PACKAGE" = both ] || [ "$PACKAGE" = container ] && echo true || echo false )" >> "$GITHUB_OUTPUT" | |
| echo "cli=$( [ "$PACKAGE" = both ] || [ "$PACKAGE" = cli ] && echo true || echo false )" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "container=${{ steps.filter.outputs.container }}" >> "$GITHUB_OUTPUT" | |
| echo "cli=${{ steps.filter.outputs.cli }}" >> "$GITHUB_OUTPUT" | |
| fi | |
| publish-container: | |
| needs: changes | |
| if: needs.changes.outputs.container == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 18 | |
| registry-url: https://registry.npmjs.org | |
| - name: Run tests | |
| run: npm test | |
| working-directory: container | |
| - name: Set canary version | |
| run: | | |
| BASE=$(node -p "require('./package.json').version") | |
| CANARY="${BASE}-staging.${GITHUB_SHA::7}" | |
| npm version "$CANARY" --no-git-tag-version | |
| working-directory: container | |
| - name: Publish to npm | |
| run: npm publish --tag canary | |
| working-directory: container | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| publish-cli: | |
| needs: changes | |
| if: needs.changes.outputs.cli == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install | |
| working-directory: cli | |
| - name: Run tests | |
| run: bun test | |
| working-directory: cli | |
| - name: Build | |
| run: bun run build | |
| working-directory: cli | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 18 | |
| registry-url: https://registry.npmjs.org | |
| - name: Set canary version | |
| run: | | |
| BASE=$(node -p "require('./package.json').version") | |
| CANARY="${BASE}-staging.${GITHUB_SHA::7}" | |
| npm version "$CANARY" --no-git-tag-version | |
| working-directory: cli | |
| - name: Publish to npm | |
| run: npm publish --tag canary | |
| working-directory: cli | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |