diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7edb019..c193c0a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,7 +12,13 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Publish - run: | - PUBLISH_VERSION=${} make publish + uses: docker/bake-action@v2 + with: + targets: publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} diff --git a/Makefile b/Makefile deleted file mode 100644 index acd0219..0000000 --- a/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -PUBLISH_VERSION ?= - -ifndef PUBLISH_VERSION -$(error PUBLISH_VERSION is not set) -endif - -.PHONY: all -all: - -.PHONY: publish -publish: - yarn install - yarn build - yarn publish --no-git-tag-version --new-version $(PUBLISH_VERSION) diff --git a/dev.Dockerfile b/dev.Dockerfile index 040b064..581bdf1 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -69,3 +69,24 @@ RUN --mount=type=bind,target=.,rw \ FROM scratch AS test-coverage COPY --from=test /tmp/coverage / + +FROM base AS publish +ARG GITHUB_REF +RUN --mount=type=bind,target=.,rw \ + --mount=type=cache,target=/src/.yarn/cache \ + --mount=type=cache,target=/src/node_modules \ + --mount=type=secret,id=NODE_AUTH_TOKEN <