diff --git a/.github/workflows/publish-on-tag.yml b/.github/workflows/publish-on-tag.yml new file mode 100644 index 0000000..ddb8304 --- /dev/null +++ b/.github/workflows/publish-on-tag.yml @@ -0,0 +1,28 @@ +name: publish-on-tag + +on: + push: + tags: + - '*' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + - name: Install dependencies + run: npm install + - name: Test + run: npm test + - name: Publish + env: + NPM_TOKEN: ${{secrets.NPM_TOKEN}} + run: | + npm config set registry 'https://wombat-dressing-room.appspot.com/' + npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}' + npm publish diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7a78e0e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: ~> 1.0 -language: node_js -os: - - linux -import: - - ljharb/travis-ci:node/all.yml - - ljharb/travis-ci:node/pretest.yml diff --git a/README.md b/README.md index f6ecf2b..a0fa790 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ES6 `String.prototype.codePointAt` polyfill [![Build status](https://travis-ci.org/mathiasbynens/String.prototype.codePointAt.svg?branch=master)](https://travis-ci.org/mathiasbynens/String.prototype.codePointAt) +# ES6 `String.prototype.codePointAt` polyfill [![string.prototype.codepointat on npm](https://img.shields.io/npm/v/string.prototype.codepointat)](https://www.npmjs.com/package/string.prototype.codepointat) A robust & optimized polyfill for [the `String.prototype.codePointAt` method in ECMAScript 6](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat). @@ -42,6 +42,28 @@ In a browser: [A polyfill + test suite for `String.fromCodePoint`](https://mths.be/fromcodepoint) is available, too. +## For maintainers + +### How to publish a new release + +1. On the `main` branch, bump the version number in `package.json`: + + ```sh + npm version patch -m 'Release v%s' + ``` + + Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). + + Note that this produces a Git commit + tag. + +1. Push the release commit and tag: + + ```sh + git push && git push --tags + ``` + + Our CI then automatically publishes the new release to npm. + ## Author | [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |