Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
steps:
- uses: actions/checkout@v6
- name: Get version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
id: get_version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- uses: actions/setup-node@v6
with:
Expand Down Expand Up @@ -63,21 +64,24 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
annotations: ${{ steps.meta.outputs.annotations }}
provenance: true
sbom: true
cache-to: type=inline
cache-from: type=registry,ref=brantburnett/couchbase-index-manager:latest

- name: Publish to NPM
if: startsWith(github.ref, 'refs/tags/') # Only on tags
run: |
npm run lerna -- version ${{ env.RELEASE_VERSION }} --no-git-tag-version --exact -y &&
npm run lerna -- version ${{ steps.get_version.outputs.RELEASE_VERSION }} --no-git-tag-version --exact -y &&
pushd packages/couchbase-index-manager && npm publish && popd &&
pushd packages/couchbase-index-manager-cli && npm publish && popd
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true

- name: Pack NPM
if: ${{!startsWith(github.ref, 'refs/tags/')}} # Only on non-tags
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20 as build
FROM node:20 AS build

WORKDIR /app
COPY ["package*.json", "lerna.json", "./"]
Expand Down