fix(configuration): setup semantic versioning for pushes to the master or beta branches

This commit is contained in:
Stevan Freeborn
2023-02-20 16:34:27 -06:00
parent 9e0c04e973
commit a6a98f2a5b
3 changed files with 45 additions and 5 deletions
+10 -4
View File
@@ -2,7 +2,11 @@ name: build_publish
on:
workflow_dispatch:
push:
paths:
- src/**
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
@@ -52,7 +56,6 @@ jobs:
with:
name: build
path: ./dist
publish:
needs: build
runs-on: ubuntu-latest
@@ -66,12 +69,15 @@ jobs:
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm install
- name: Download a build artifact
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
- name: Download build artifact
uses: actions/download-artifact@v3.0.2
with:
name: build
path: ./dist
- name: Publish to npm registry
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ACTIONS_PAT }}
run: npx semantic-release