Skip to content

Commit

Permalink
Fix publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeAstapov committed Sep 4, 2024
1 parent ba90cf7 commit c5e5747
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: CI Publish

on:
push:
tags:
- '*'
# push:
# tags:
# - '*'
pull_request:
paths:
- '.github/workflows/publish.yml'

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
Expand All @@ -17,15 +21,20 @@ jobs:
with:
node-version: 18.x
cache: pnpm
registry-url: https://registry.npmjs.org/
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: pnpm install
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

- name: Copy .md files
run: cp CHANGELOG.md LICENSE.md README.md packages/ember-cli-mirage/

- run: npm publish
- name: npm publish
run: npm publish --tag=latest --verbose --workspace=ember-cli-mirage
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: packages/ember-cli-mirage

0 comments on commit c5e5747

Please sign in to comment.