Skip to content
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

Automate releases to git, GitHub, npm #640

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
node_modules
bower_components
.env
*~
dist/filer-issue225.js
.vscode

# Parcel build dirs
Expand Down
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*
*/
!README.md
!package.json
!LICENSE
!dist/filer.js
!dist/filer.map
!dist/filer.min.js
!dist/filer.min.map
17 changes: 17 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"scripts": {
"beforeStart": "npm run test",
"beforeBump": "npm run build"
},
"git": {
"pushRepo": "git@github.com:filerjs/filer.git"
},
"npm": {
"publish": true
},
"github": {
"release": true,
"releaseName": "Filer.js %s Released",
"assets": [ "dist/*.zip" ]
}
}
10 changes: 9 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ make a pull request. If your patch includes code, make sure to check that all th
unit tests pass, including any new tests you wrote. Finally, make sure you add yourself
to the `AUTHORS` file.

=======
## Tests

Tests are writting using [Mocha](http://visionmedia.github.io/mocha/) and [Chai](http://chaijs.com/api/bdd/).
Expand All @@ -57,3 +56,12 @@ an example.
## Communication

If you'd like to talk to someone about the project, you can reach us on irc.mozilla.org in the #filer or #mofodev channel. Look for "ack" or "humph".

## Releases

In order to perform a release, you'll need commit access to the main Filer repo,
as well as access to publish to Filer's npm module. To do a release:

1. Make sure you have a .env file, with your `GITHUB_TOKEN` included. See [`env.sample`](env.sample) for more info on how to create one.
1. Login to the `npm` registry if you haven't already using `npm login`
1. Run `npm run release`. Releases are done interactively using [release-it](https://www.npmjs.com/package/release-it), and our config is defined in [`.release-it.json`](.release-it.json).
5 changes: 0 additions & 5 deletions config/environment.js

This file was deleted.

13 changes: 4 additions & 9 deletions env.sample
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
###
# Dev ENVIRONMENT file
#
# Copy to .env to use defaults
# Copy to .env to use defaults when releasing via `npm release`
###

# GIT (upstream) url to publish to
export FILER_UPSTREAM_URI="git@github.com:js-platform/filer.git"

# GIT (upstream) branch to publish to
export FILER_UPSTREAM_BRANCH="develop"

# Remote name for upstream repo
export FILER_UPSTREAM_REMOTE_NAME="origin"
# GitHub Personal Access Token (to push releases)
# https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/
export GITHUB_TOKEN=
Loading