Skip to content

fix: github action bug #14

fix: github action bug

fix: github action bug #14

Workflow file for this run

name: Publish Package to npmjs
on:
push:
branches:
- main
merge_group:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Bump version and push tag
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
git-message: "change log (release): {version}"
preset: "angular"
tag-prefix: "v"
output-file: "CHANGELOG.md"
skip-on-empty: false
- name: Deploy to stable => Merge main -> stable
run: |
git fetch origin stable
git checkout stable
git merge main
git push
# - name: Create Release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body_path: CHANGELOG.md
# draft: false
# prerelease: false
- name: Publish package to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm ci --legacy-peer-deps
npm run bundle
npm publish