-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #401 from tracked-tools/publish-unstable
add publish-unstable workflow
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# For every push to the master branch, this publishes an NPM package to the | ||
# "unstable" NPM tag. | ||
|
||
name: Publish Unstable | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
publish: | ||
name: "NPM Publish" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14.x | ||
cache: yarn | ||
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install Dependencies | ||
run: yarn 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: set version | ||
run: npm version --no-git-tag-version --workspaces-update=false `node -e "console.log(require('./package.json').version)"`-unstable.`git rev-parse --short HEAD` | ||
working-directory: ember-async-data | ||
|
||
- name: npm publish | ||
run: npm publish --tag=unstable --verbose --workspace=ember-async-data | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |