name: Publish CLI on: push: tags: ["*"] pull_request: branches: ["main"] env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }}-cli jobs: publish-npm: runs-on: self-hosted permissions: contents: read packages: write steps: - name: Checkout repository uses: actions/checkout@v4 - name: Setup Node.js environment uses: actions/setup-node@v4.2.0 with: node-version: "22.x" check-latest: true registry-url: 'https://npm.pkg.github.com' scope: '@schmelczer' - name: Install dependencies run: | cd frontend npm ci npm run build - name: Publish to GitHub Packages env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | cd frontend/local-client-cli npm publish