Throw error so client can handle internally #31
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
# | |
# GitHub Actions workflow. | |
# | |
# Releases the package to npm when a push into main is detected. | |
# * Bump version number | |
# * Release to NPM | |
# | |
name: 'Release Package: NuxtJs' | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'nuxtjs/**' | |
- '.github/workflows/nuxtjs.release.yml' | |
workflow_dispatch: | |
jobs: | |
release: | |
name: 'Release Package: NuxtJs' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_CI_CD_RELEASE }} | |
sparse-checkout: | | |
nuxtjs | |
- run: corepack enable | |
- name: 'Install Node.js' | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: 'Version Bump' | |
uses: phips28/gh-action-bump-version@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_CI_CD_RELEASE }} | |
PACKAGEJSON_DIR: nuxtjs | |
with: | |
major-wording: 'JLMAJOR' | |
minor-wording: 'feature,feat' | |
patch-wording: 'patch,fixes,fix,misc,docs,refactor' | |
commit-message: 'Release Package: Llana NuxtJs Plugin Bump Version [skip ci]' | |
skip-tag: true | |
- name: Install dependencies | |
run: cd nuxtjs/ && npx nypm@latest i && cd .. | |
- name: 'Pull version' | |
run: cd nuxtjs/ && git pull && cd .. | |
- name: 'Authenticate with NPM' | |
run: cd nuxtjs/ && echo -e "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc && cd .. | |
- name: 'Publishing package' | |
run: cd nuxtjs/ && npm run build && npm publish && cd .. |