diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..8c2f3350 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,24 @@ +name: Lerna publish + +on: + push: + branches: [ main ] + +jobs: + publish: + runs-on: ubuntu-latest + if: "contains(github.event.head_commit.message, 'chore(release): bump version')" + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.GH_TOKEN }} + - name: Use Node.js 18.x + uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org/' + - run: npm ci + - run: npm run build + - run: npm run lerna publish from-package + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release.yml similarity index 83% rename from .github/workflows/release-and-publish.yml rename to .github/workflows/release.yml index 3cbbfbf9..b2e92ab0 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Lerna version & publish +name: Lerna version on: push: @@ -26,6 +26,3 @@ jobs: - run: npm run test - run: npm run build - run: npm run lerna version - - run: npm run lerna publish from-package - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}