diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0b6f1e..bb5c5cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,6 +118,8 @@ jobs: path: artifacts - uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' - name: Install dependencies run: npm -g install "lcov-result-merger@4.x.x" "lcov-badge2@1.1.1" @@ -139,3 +141,25 @@ jobs: with: add: docs/images/coverage.svg message: 'chore: update coverage badge' + + publish: + name: Publish + needs: [sanity, compatibility] + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - uses: bahmutov/npm-install@v1 + with: + useLockFile: false + + - name: Semantic release + run: npx --no-install semantic-release --debug + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.releaserc b/.releaserc deleted file mode 100644 index 2c63c08..0000000 --- a/.releaserc +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/package.json b/package.json index 35c21fc..474e626 100644 --- a/package.json +++ b/package.json @@ -163,6 +163,7 @@ "lodash": "^4.17.21", "nyc": "^15.1.0", "prettier": "^3.0.0", + "semantic-release": "^22.0.5", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", "typedoc": "^0.24.8",