Skip to content

Commit

Permalink
Set up automated npm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Sep 14, 2021
1 parent 4d8cca5 commit 5096093
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/publish-on-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: publish-on-tag

on:
push:
tags:
- '*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- 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
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# unicode-property-aliases-ecmascript [![Build status](https://travis-ci.org/mathiasbynens/unicode-property-aliases-ecmascript.svg?branch=master)](https://travis-ci.org/mathiasbynens/unicode-property-aliases-ecmascript)
# unicode-property-aliases-ecmascript [![Build status](https://travis-ci.org/mathiasbynens/unicode-property-aliases-ecmascript.svg?branch=main)](https://travis-ci.org/mathiasbynens/unicode-property-aliases-ecmascript) [![unicode-property-aliases-ecmascript on npm](https://img.shields.io/npm/v/unicode-property-aliases-ecmascript)](https://www.npmjs.com/package/unicode-property-aliases-ecmascript)

_unicode-property-aliases-ecmascript_ offers Unicode property alias mappings in an easy-to-consume JavaScript format. It only contains the Unicode property names that are supported in [ECMAScript RegExp property escapes](https://github.com/tc39/proposal-regexp-unicode-property-escapes).

Expand Down Expand Up @@ -27,6 +27,28 @@ propertyAliases.get('scx')
// → 'Script_Extensions'
```

## 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") |
Expand Down

0 comments on commit 5096093

Please sign in to comment.