From a2ac744e3b480c408779edff217d370cb3245e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C4=8Cerm=C3=A1k?= Date: Wed, 8 Sep 2021 13:48:04 +0200 Subject: [PATCH] :construction_worker: Add release config for github actions --- .github/workflows/release.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/test.yml | 2 +- package.json | 3 ++- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b1f5692 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Node.js Package + +on: + release: + types: [created] + push: + tags: + - '*' + +jobs: + build: + 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' + + - name: Install dependencies & build packages + run: yarn install --frozen-lockfile + + - name: Run tests + run: yarn test:ci + + - name: Publish packages + run: yarn release:beta + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_TEST }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70503f4..acc0972 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: Node.js CI on: [push, pull_request] jobs: - test: + build: runs-on: ubuntu-latest steps: diff --git a/package.json b/package.json index 7a54d6c..79f5a13 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "format": "prettier --config ./prettier.config.js --write 'packages/@ackee/*/src/**/*.ts' '*.{js,json}' --loglevel warn", "release": "lerna publish --no-push", "release:beta": "yarn release --dist-tag beta --no-push", + "release:alpha": "yarn release --dist-tag alpha --no-push", "prepare": "yarn build", "release:yalc": "yarn prepare && lerna exec -- yalc push --no-scripts", "circular-modules": "lerna exec -- madge --circular src", @@ -69,7 +70,7 @@ "husky": { "hooks": { "pre-commit": "lint-staged", - "pre-push": "yarn circular-modules && yarn docs:build && yarn docs:commit" + "pre-push": "yarn circular-modules" } }, "lint-staged": {