Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GH workflow to publish canary releases.
- Loading branch information
Showing
5 changed files
with
50 additions
and
10 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,44 @@ | ||
# TODO: Figure out how to make this workflow depend on the build, lint, test | ||
# workflow. Then we don't have to double down on these run tasks. | ||
|
||
name: Publish canaray packages to npm | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
tags-ignore: [v*] # We do not want to publish a canary release when we're publish an actual release | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Required because lerna uses tags to determine the version. | ||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
- name: Print node and yarn versions | ||
run: | | ||
node --version | ||
yarn --version | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile --check-files | ||
- name: Run ESLint | ||
run: yarn lint | ||
env: | ||
CI: true | ||
- name: Build | ||
run: yarn build | ||
- name: Run tests | ||
run: yarn test | ||
env: | ||
CI: true | ||
- name: Publish to npm | ||
run: | | ||
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc | ||
./tasks/publish-canary | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |
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
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
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,7 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# This publishes a "canary" version of our packages to npm. | ||
# It is intended to be run when a package is merged to master. | ||
# It is run when a branch is merged to master. | ||
# https://github.com/lerna/lerna/tree/master/commands/publish#--canary | ||
|
||
yarn lerna publish --force-publish --canary --preid canary --dist-tag canary --yes |
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