Update npm-publish-github-packages.yml #51
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: 🪩 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/ | |