chore(release): use semantic-release for versioning #28
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
--- | |
# | |
# Documentation: | |
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | |
# | |
####################################### | |
# Start the job on all push to master # | |
####################################### | |
name: 'Build & Deploy - Beta' | |
on: | |
push: | |
branches: | |
- master | |
permissions: read-all | |
concurrency: | |
group: ${{ github.ref_name }}-${{ github.workflow }} | |
cancel-in-progress: true | |
############### | |
# Set the Job # | |
############### | |
jobs: | |
# Deploy to NPM | |
deploy_to_npm: | |
name: Deploy to NPM (beta) | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
environment: | |
name: beta | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/[email protected] | |
with: | |
node-version: 18.x | |
registry-url: https://registry.npmjs.org | |
scope: rubenhalman | |
- name: Install Dependencies | |
run: | | |
npm ci | |
npm i -D @semantic-release @semantic-release/commit-analyzer @semantic-release/changelog @semantic-release/npm @semantic-release/git | |
- name: Publish Beta | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKENX }} | |
run: npx semantic-release | |