ci: add semantic-release to publish workflow #5
Workflow file for this run
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: Publish | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
push: | |
branches: [add-semantic-release] | |
jobs: | |
build: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Install semantic-release extra plugins | |
run: npm install --save-dev @semantic-release/changelog @semantic-release/git | |
- name: Install | |
run: yarn | |
- name: Build | |
run: yarn build | |
# - name: Publish | |
# uses: JS-DevTools/npm-publish@v3 | |
# with: | |
# token: ${{ secrets.CERN_SIS_NPM }} | |
- name: Publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.CERN_SIS_NPM }} | |
run: npx semantic-release |