diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli-docker.yml similarity index 65% rename from .github/workflows/publish-cli.yml rename to .github/workflows/publish-cli-docker.yml index f439246d..73ef1b12 100644 --- a/.github/workflows/publish-cli.yml +++ b/.github/workflows/publish-cli-docker.yml @@ -50,7 +50,7 @@ jobs: with: context: frontend file: frontend/local-client-cli/Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -62,41 +62,3 @@ jobs: TAGS: ${{ steps.meta.outputs.tags }} DIGEST: ${{ steps.build-and-push.outputs.digest }} run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} - - 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 - - - name: Build CLI - run: | - cd frontend/local-client-cli - npm run build - - - name: Publish to GitHub Packages - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - cd frontend/local-client-cli - # Update package.json to use scoped name for GitHub Packages - npm version --no-git-tag-version ${GITHUB_REF#refs/tags/} - npm publish diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 00000000..c9289a0f --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,44 @@ +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 diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-server-docker.yml similarity index 100% rename from .github/workflows/publish-docker.yml rename to .github/workflows/publish-server-docker.yml