Skip to content

add workflow to build pr previews #4

add workflow to build pr previews

add workflow to build pr previews #4

name: release-next-package
on:
push:
branches: [main]
jobs:
release-next-package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Test
run: npm test
- name: Publish to npm
run: |
next_version=$(npm view @redhat-developer/red-hat-developer-hub-theme@next version)
npm version $next_version --no-git-tag-version
npm version patch --no-git-tag-version
npm publish --access=public --tag=next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}