feat: charity #33
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: Create new release and publish new version | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
create_release: | |
name: Create release and publish | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'larrrssss' && github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)') && !contains(github.event.head_commit.message, '[skip ci]') | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Node v16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: npm ci | |
- name: Publish release to npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
- name: Create GitHub release | |
run: node ./scripts/create-release.mjs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |