Skip to content

Commit

Permalink
chore: add semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
jeswr committed Oct 27, 2023
1 parent e1cc8dd commit 2ebde05
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,13 @@
"statements": 100
}
}
},
"release": {
"branches": [
"main"
]
},
"publishConfig": {
"access": "public"
}
}

0 comments on commit 2ebde05

Please sign in to comment.