Skip to content

Update npm-publish-github-packages.yml #51

Update npm-publish-github-packages.yml

Update npm-publish-github-packages.yml #51

name: 🪩 Create Gleamy NPM package
on:
push:
tags:
- '*'
jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
env:
NODE_ENV: production
with:
node-version: '16.x'
cache: npm
- run: npm install
- run: npm run lint
- run: npm run test
build:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
env:
NODE_ENV: production
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
with:
always-auth: true
node-version: '16.x'
registry-url: 'https://registry.npmjs.org/'
cache: npm
- run: npm install
- run: npm run gleamy:build
- run: echo "publishing version ${{ env.RELEASE_VERSION }}"
- run: npm version ${{ env.RELEASE_VERSION }}
- run: npm run gleamy:publish
env:
NODE_ENV: production
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
upload-reports:
needs: [build]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
env:
NODE_ENV: production
with:
node-version: '16.x'
cache: npm
- run: npm install
- run: npm run test:coverage
- name: 🧚🏼‍♀️ Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: reports
path: reports/