Skip to content

Commit

Permalink
Add GH workflow to publish canary releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterp committed May 10, 2020
1 parent bcfb26a commit a728f83
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 9 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish-npm-canary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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
- 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: |
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc
./tasks/publish-canary
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
7 changes: 4 additions & 3 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@

let supportRedwoodAutoPageImports = false
try {
// This will throw if the module cannot be resolved, it will not
// resolve if the module is not built, in which case we're probably
// This will throw if the module cannot be resolved,
// it will not resolve if the module is not built,
// in which case we're probably
// building the framework and don't need this plugin.
require.resolve('@redwoodjs/eslint-plugin-redwood')
supportRedwoodAutoPageImports = {
Expand All @@ -37,7 +38,7 @@ module.exports = {
'react',
'react-hooks',
'jest-dom',
supportRedwoodAutoPageImports && '@redwoodjs/redwood', // @redwoodjs/redwood-eslint-plugin
supportRedwoodAutoPageImports && '@redwoodjs/eslint-plugin-redwood',
].filter(Boolean),
ignorePatterns: ['node_modules', 'dist'],
extends: [
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"@redwoodjs/eslint-plugin-redwood": "^0.4.0",
"@redwoodjs/eslint-plugin-redwood": "0.6.0",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"babel-eslint": "^10.1.0",
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2306,11 +2306,6 @@
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=

"@redwoodjs/eslint-plugin-redwood@^0.4.0":
version "0.4.0"
resolved "https://registry.yarnpkg.com/@redwoodjs/eslint-plugin-redwood/-/eslint-plugin-redwood-0.4.0.tgz#0f89655811c09f662bcdc92596de01575b5af796"
integrity sha512-yF2gIBhg/AipzXGIZP+u1+OjwZrIuOTm3KEhADm26Qxri87WgHLFuPdyN3LYEjew71qIb0Q9OUQqgPMSNwxYfg==

"@rollup/plugin-commonjs@11.0.1":
version "11.0.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.1.tgz#6056a6757286901cc6c1599123e6680a78cad6c2"
Expand Down

0 comments on commit a728f83

Please sign in to comment.