From abbce5d76429ce2ee6eba10a187db33c9d3cd7e3 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sat, 7 Aug 2021 13:02:49 +0200 Subject: [PATCH 1/2] package.json: Replace `prepublish` with `prepack` see https://docs.npmjs.com/cli/v7/using-npm/scripts#life-cycle-scripts --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0d1fdee0..ce6b2d9e 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "clean": "rimraf lib", "fix": "yarn lint -- --fix", "lint": "eslint src --ext ts --format stylish", - "prepublish": "yarn build", + "prepack": "yarn build", "prettier": "prettier --write 'src/**/*.ts'", "test": "jest", "test-ci": "yarn build && yarn test", From fae36f333e2526770a08f21d5bc1a9d803a1c5be Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sat, 7 Aug 2021 12:59:59 +0200 Subject: [PATCH 2/2] CI: Release tags automatically --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..ad1dfa5d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + release: + name: Release + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14.x + registry-url: 'https://registry.npmjs.org' + + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}