Skip to content

Merge pull request #170 from ember-animation/dependabot/npm_and_yarn/… #24

Merge pull request #170 from ember-animation/dependabot/npm_and_yarn/…

Merge pull request #170 from ember-animation/dependabot/npm_and_yarn/… #24

Workflow file for this run

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 }}