-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba90cf7
commit e390837
Showing
1 changed file
with
21 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,43 @@ | ||
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 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8.x | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
cache: pnpm | ||
registry-url: https://registry.npmjs.org/ | ||
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 | ||
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 |