diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 69cdc4a..1a934b9 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -14,7 +14,11 @@ on: - patch jobs: + test: + uses: ./.github/workflows/test.yaml + publish: + needs: test runs-on: ubuntu-latest permissions: contents: write diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b35f6f5..cb444a2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,6 +1,8 @@ name: Test -on: push +on: + push: + workflow_call: jobs: test: diff --git a/Makefile b/Makefile index 104c93d..5b84598 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,18 @@ +clean: + rm -rf coverage + rm -rf packages/bolt-s3/{dist,build} + rm -rf packages/bolt-dynamodb/{dist,build} + test: docker compose up -d docker compose exec localstack /home/localstack/wait-for-localstack.sh npm run test docker compose down -publish: test - npm -w packages/bolt-s3 run compile +publish: + npm -w packages/bolt-s3 run build npm -w packages/bolt-s3 publish --provenance --access public - npm -w packages/bolt-dynamodb run compile + npm -w packages/bolt-dynamodb run build npm -w packages/bolt-dynamodb publish --provenance --access public -.PHONY: test +.PHONY: clean test publish