Merge pull request #174 from ember-animation/dependabot/npm_and_yarn/… #27
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: Publish | |
on: | |
push: | |
branches: | |
- main | |
- master | |
tags: | |
- v* | |
jobs: | |
publish: | |
name: Publish | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.x | |
- name: Install Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: 'pnpm' | |
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install Dependencies | |
run: pnpm install --frozen-lockfile | |
# We need a workspace aware version of npm because our addon is in a subdir but our .npmrc is in the root | |
- name: npm8 | |
run: npm install -g npm@8 | |
# We need a workspace aware version of npm because our addon is in a subdir but our .npmrc is in the root | |
- name: copy .md files | |
run: cp README.md LICENSE.md CHANGELOG.md addon/ | |
- name: npm publish | |
run: npm publish --tag=latest --verbose --workspace=addon | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |