Skip to content

Commit

Permalink
Merge pull request #401 from tracked-tools/publish-unstable
Browse files Browse the repository at this point in the history
add publish-unstable workflow
  • Loading branch information
SergeAstapov authored Dec 12, 2022
2 parents c90abe6 + aef27ea commit 7a3f452
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish-unstable.yml
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 }}

0 comments on commit 7a3f452

Please sign in to comment.