Merge branch 'main' of github.com:speed-highlight/core #104
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read # for checkout | |
jobs: | |
release: | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
issues: write # to be able to comment on released issues | |
pull-requests: write # to be able to comment on released pull requests | |
id-token: write # to enable use of OIDC for npm provenance | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Repo | |
uses: actions/checkout@v3 # v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 # v3 | |
with: | |
cache: npm | |
node-version: lts/* | |
- run: npm clean-install | |
- run: npm audit signatures | |
- run: npm run build | |
- name: Build documention | |
run: npx -y typedoc src/index.js src/detect.js src/terminal.js | |
- name: Auto commit | |
run: | | |
git add . | |
git -c user.name='minify-bot' -c user.email='[email protected]' commit -m "Auto minify" || exit 0 | |
git push | |
env: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |