-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Parcel build and publish workflow #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
6ad0cbf
wip: parcel build
devongovett 193561c
Move spectrum-css-temp to a dev dependency
devongovett 37df297
Alpha versions
devongovett e8c3010
Merge branch 'master' of github.com:adobe/react-spectrum-v3 into parc…
devongovett 80eb85f
Add .npmignore for icons packages
devongovett 4342f82
New filenames
devongovett 9e97a89
Use parcel’s babel preset
devongovett e4b47b1
Create @react-spectrum/theme-default package
devongovett 8285b76
Add @babel/runtime and sideEffects: false to packages
devongovett 1d9f0fa
Add package.json linter
devongovett ecb21ab
Add publish workflow
devongovett 4286805
Set npm registry for publishing and next branch
devongovett cce3216
Fix indentation
devongovett 339f4c7
more fix
devongovett 4d58712
YAML is stupid
devongovett 64c68d8
Add parcel release version
devongovett 99fcff6
Fix yarn.lock
devongovett 98b97e9
Theme shouldn’t be required
devongovett 62fb515
Fix import
devongovett cecfa2a
Fix package linter
devongovett ef37702
Alpha versions
devongovett 1df324e
Add publishConfig
devongovett 0f26f2b
Merge branch 'master' of github.com:adobe/react-spectrum-v3 into parc…
devongovett adbcfac
Fix dependencies
devongovett f3921ca
oidhfoidhjf
devongovett 11fcaab
more
devongovett 4057db5
MORE
devongovett bb44122
Move babel runtime transform into production env
devongovett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,35 @@ | ||
| name: Publish | ||
| on: | ||
| push: | ||
| branches: | ||
| - next | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Use Node 12 | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node_version: 12.x | ||
| - name: Write npmrc | ||
| env: | ||
| NPMRC: ${{ secrets.NPMRC }} | ||
| run: echo "$NPMRC" > .npmrc | ||
| - name: install | ||
| run: yarn install | ||
| - name: Configure CI Git User | ||
| run: | | ||
| git remote rm origin | ||
| git remote add origin "https://github-actions:[email protected]/adobe/react-spectrum-v3.git" | ||
| git fetch | ||
| git config --global user.email [email protected] | ||
| git config --global user.name GitHub Actions | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: deploy | ||
| run: | | ||
| git reset --hard | ||
| git checkout next | ||
| git reset --hard origin/next | ||
| make ci | ||
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
|
|
||
| SHELL := /bin/bash | ||
| PATH := ./node_modules/.bin:$(PATH) | ||
| NPM_REGISTRY=https://artifactory.corp.adobe.com:443/artifactory/api/npm/npm-react-release/ | ||
| NPM_REGISTRY=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/ | ||
| [email protected] | ||
|
|
||
| all: node_modules | ||
|
|
@@ -55,47 +55,27 @@ clean_docs_node_modules: | |
| lint: | ||
| yarn check-types | ||
| eslint packages --ext .js,.ts,.tsx | ||
| node lint-packages.js | ||
|
|
||
| test: | ||
| yarn jest | ||
|
|
||
| ci-test: lint test | ||
|
|
||
| storybook: | ||
| yarn build-storybook | ||
| NODE_ENV=storybook yarn build-storybook | ||
|
|
||
| deploy: storybook docs | ||
| ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null $(SERVER) mkdir -p "~/rsp" | ||
| scp -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -r documentation/public/* "$(SERVER):~/rsp/." | ||
| scp -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -r public/* "$(SERVER):~/rsp/." | ||
|
|
||
| ci-deploy: | ||
| @if [ "$$VERSION" == "major" ] || [ "$$VERSION" == "minor" ] || [ "$$VERSION" == "patch" ] || [ "$$VERSION" == "website only" ]; then \ | ||
| $(MAKE) deploy; \ | ||
| fi | ||
|
|
||
| # Run this as make version VERSION={patch|minor|major} | ||
| version: | ||
| lerna version ${VERSION} --yes --no-commit-hooks -m "chore(release): publish" | ||
| cp src/package.json dist/package.json | ||
|
|
||
| ci-version: | ||
| if [ "$$VERSION" != "publish only" ]; then \ | ||
| $(MAKE) version; \ | ||
| fi | ||
|
|
||
| publish: build ci-version | ||
| lerna publish from-git --yes --registry $(NPM_REGISTRY) --contents dist | ||
| # for now doesn't have deploy since v3 doesn't have a place for docs and stuff yet | ||
| ci: | ||
| $(MAKE) publish | ||
|
|
||
| ci-publish: | ||
| @if [ "$$VERSION" != "website only" ]; then \ | ||
| $(MAKE) publish; \ | ||
| fi | ||
| publish: build | ||
| lerna publish from-package --yes --registry $(NPM_REGISTRY) | ||
|
|
||
| # Run this on Jenkins with VERSION={patch|minor|major} as an argument, this will bump all the changed packages | ||
| # So major bumps everything as major, minor bumps everything as minor, ... | ||
| ci: | ||
| @if [ ! -z "$$VERSION" ] && [ "$$VERSION" != "noop" ]; then \ | ||
| $(MAKE) ci-deploy; \ | ||
| $(MAKE) ci-publish; \ | ||
| fi | ||
| build: | ||
| parcel build packages/@react-{spectrum,aria,stately}/*/ --no-minify | ||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| "command": { | ||
| "publish": { | ||
| "allowBranch": [ | ||
| "master" | ||
| "next" | ||
| ] | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or 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
File renamed without changes.
This file contains hidden or 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 hidden or 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,30 @@ | ||
| const glob = require('fast-glob'); | ||
| const fs = require('fs'); | ||
| const assert = require('assert'); | ||
|
|
||
| let packages = glob.sync(__dirname + '/packages/@react-{aria,spectrum,stately}/*/package.json'); | ||
|
|
||
| for (let pkg of packages) { | ||
| let json = JSON.parse(fs.readFileSync(pkg)); | ||
| assert(json.main, `${pkg} did not have "main"`); | ||
| assert(json.module, `${pkg} did not have "module"`); | ||
| assert(json.types, `${pkg} did not have "types"`); | ||
| assert(json.source, `${pkg} did not have "source"`); | ||
| assert.deepEqual(json.files, ['dist'], `${pkg} did not match "files"`); | ||
| assert.equal(json.sideEffects, false, `${pkg} is missing sideEffects: false`); | ||
| assert(!json.dependencies || !json.dependencies['@adobe/spectrum-css-temp'], `${pkg} has @adobe/spectrum-css-temp in dependencies instead of devDependencies`); | ||
| assert(json.dependencies && json.dependencies['@babel/runtime'], `${pkg} is missing a dependency on @babel/runtime`); | ||
|
|
||
| if (json.name.startsWith('@react-spectrum') && json.devDependencies && json.devDependencies['@adobe/spectrum-css-temp']) { | ||
| assert.deepEqual(json.targets, { | ||
| main: { | ||
| includeNodeModules: ['@adobe/spectrum-css-temp'] | ||
| }, | ||
| module: { | ||
| includeNodeModules: ['@adobe/spectrum-css-temp'] | ||
| } | ||
| }, `${pkg} did not match "targets"`); | ||
| } | ||
|
|
||
| assert(json.publishConfig && json.publishConfig.access === 'public', `${pkg} has missing or incorrect publishConfig`); | ||
| } |
This file contains hidden or 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 hidden or 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
1 change: 0 additions & 1 deletion
1
packages/@adobe/spectrum-css-temp/components/actionmenu/vars.css
This file contains hidden or 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,2 +1 @@ | ||
| @import './index.css'; | ||
| @import './skin.css'; |
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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,5 +1,5 @@ | ||
| { | ||
| "name": "@adobe/spectrum-css-temp", | ||
| "private": true, | ||
| "version": "3.0.0" | ||
| "version": "3.0.0-alpha.1" | ||
| } |
This file contains hidden or 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 @@ | ||
| export * from './src'; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm assuming this e-mail isn't our own?