diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9fe13a7..57b65c9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,3 +25,19 @@ jobs: cache: "npm" - run: npm ci - run: npm test --if-present + publish: + runs-on: ubuntu-latest + if: ${{github.ref == 'refs/heads/main'}} + needs: [quality] + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - run: npm ci + - run: npm run semantic-release + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 76b0429..7ae7030 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,8 @@ "lint:fix": "eslint . --fix", "lint:watch": "esw -w lib/**", "publish": "npm publish", - "semantic-release": "semantic-release --branches main" + "semantic-release": "semantic-release --branches main", + "acp": "git add . && npm run commit && git push" }, "config": { "commitizen": {