diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d99341b7..ca80a94b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,3 +70,25 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: . + + release: + if: ${{ github.ref == 'refs/heads/main' }} + needs: [ test, spec ] + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + issues: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 20.x + - run: npm ci + - run: npm run build + - name: Release + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} + run: npx semantic-release@22 --dry-run diff --git a/package.json b/package.json index 28964032..e414f180 100644 --- a/package.json +++ b/package.json @@ -94,5 +94,13 @@ "statements": 100 } } + }, + "release": { + "branches": [ + "main" + ] + }, + "publishConfig": { + "access": "public" } }