Skip to content

Commit ea4b172

Browse files
authored
ci: add auto-release (#105)
1 parent dabf951 commit ea4b172

File tree

8 files changed

+4657
-231
lines changed

8 files changed

+4657
-231
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: release-automated
2+
on:
3+
push:
4+
branches: [ master, release, alpha, beta ]
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v2
11+
with:
12+
persist-credentials: false
13+
- name: Setup Node
14+
uses: actions/setup-node@v2
15+
with:
16+
node-version: 14
17+
- name: Cache Node.js modules
18+
uses: actions/cache@v2
19+
with:
20+
path: ~/.npm
21+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22+
restore-keys: |
23+
${{ runner.os }}-node-
24+
- name: Install dependencies
25+
run: npm ci
26+
- name: Run semantic-release
27+
run: npx semantic-release
28+
env:
29+
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
30+
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
31+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

ChangeLog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 5.1.1
1+
# [5.1.1](https://github.com/parse-community/node-apn/compare/5.1.0...5.1.1) (2022-03-27)
22

33
# Bug Fixes
44
- Various dependency upgrades to fix vulnerabilities

LICENSE

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1-
Copyright (c) 2010 Andrew Naylor
1+
Parts of this software are copyright (c) 2010 Andrew Naylor.
2+
Parts of this software are copyright (c) Parse Platform.
3+
All rights reserved.
24

3-
Permission is hereby granted, free of charge, to any person obtaining a copy
4-
of this software and associated documentation files (the "Software"), to deal
5-
in the Software without restriction, including without limitation the rights
6-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7-
copies of the Software, and to permit persons to whom the Software is
8-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
6+
furnished to do so, subject to the following conditions:
97

10-
The above copyright notice and this permission notice shall be included in
11-
all copies or substantial portions of the Software.
8+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
129

13-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19-
THE SOFTWARE.
10+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 29 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,52 @@
1-
[<p align="center"><img src="doc/logo.png" alt="node-apn" width="450" height="auto"></p>][node-apn]
1+
# Node APN <!-- omit in toc -->
22

3-
node-apn
4-
========
3+
[![Build Status](https://github.com/parse-community/node-apn/workflows/ci/badge.svg?branch=master)](https://github.com/parse-community/parse-server-push-adapter/actions?query=workflow%3Aci+branch%3Amaster)
4+
[![Snyk Badge](https://snyk.io/test/github/parse-community/node-apn/badge.svg)](https://snyk.io/test/github/parse-community/parse-server-push-adapter)
5+
[![Coverage](https://img.shields.io/codecov/c/github/parse-community/node-apn/master.svg)](https://codecov.io/github/parse-community/parse-server-push-adapter?branch=master)
6+
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/node-apn/releases)
57

6-
> A Node.js module for interfacing with the Apple Push Notification service.
8+
[![npm latest version](https://img.shields.io/npm/v/@parse/node-apn.svg)](https://www.npmjs.com/package/@parse/node-apn)
79

8-
<a href="https://github.com/parse-community/node-apn/actions?query=workflow%3Aci+branch%3Amaster">
9-
<img alt="Build status" src="https://github.com/parse-community/node-apn/workflows/ci/badge.svg?branch=master">
10-
</a>
11-
<a href="http://codecov.io/github/parse-community/node-apn?branch=master"><img alt="Test coverage" src="http://codecov.io/github/parse-community/node-apn/coverage.svg?branch=master"></a>
10+
---
1211

13-
[logo]:doc/logo.png
14-
[npm-image]:https://nodei.co/npm/@parse/node-apn.png?downloads=true
15-
[npm-url]:https://npmjs.com/package/@parse/node-apn
16-
[ci-image]:https://api.travis-ci.org/parse-community/node-apn.svg
17-
[ci-url]:https://travis-ci.org/parse-community/node-apn
12+
A Node.js module for interfacing with the Apple Push Notification service.
1813

19-
## Features
14+
---
2015

21-
- Based on HTTP/2 based provider API
22-
- Maintains a connection to the server to maximise notification batching and throughput.
23-
- Automatically resends unsent notifications if an error occurs
16+
- [Features](#features)
17+
- [Installation](#installation)
18+
- [Quick Start](#quick-start)
19+
- [Load in the module](#load-in-the-module)
20+
- [Connecting](#connecting)
21+
- [Connecting through an HTTP proxy](#connecting-through-an-http-proxy)
22+
- [Using a pool of http/2 connections](#using-a-pool-of-http2-connections)
23+
- [Sending a notification](#sending-a-notification)
24+
25+
# Features
2426

25-
## Installation
27+
- Based on HTTP/2 based provider API
28+
- Maintains a connection to the server to maximize notification batching and throughput.
29+
- Automatically re-sends unsent notifications if an error occurs
2630

27-
[npm][] is the preferred installation method:
31+
# Installation
2832

2933
```bash
3034
$ npm install @parse/node-apn --save
3135
```
3236

33-
## Quick Start
37+
# Quick Start
3438

3539
This readme is a brief introduction, please refer to the full [documentation](doc/apn.markdown) in `doc/` for more details.
3640

3741
If you have previously used v1.x and wish to learn more about what's changed in v2.0, please see [What's New](doc/whats-new.markdown)
3842

39-
### Load in the module
43+
## Load in the module
4044

4145
```javascript
4246
var apn = require('@parse/node-apn');
4347
```
4448

45-
### Connecting
49+
## Connecting
4650
Create a new connection to the Apple Push Notification provider API, passing a dictionary of options to the constructor. You must supply your token credentials in the options.
4751

4852
```javascript
@@ -64,7 +68,7 @@ For more information about configuration options consult the [provider documenta
6468

6569
Help with preparing the key and certificate files for connection can be found in the [wiki][certificateWiki]
6670

67-
#### Connecting through an HTTP proxy
71+
### Connecting through an HTTP proxy
6872

6973
If you need to connect through an HTTP proxy, you simply need to provide the `proxy: {host, port}` option when creating the provider. For example:
7074

@@ -87,7 +91,7 @@ var apnProvider = new apn.Provider(options);
8791

8892
The provider will first send an HTTP CONNECT request to the specified proxy in order to establish an HTTP tunnel. Once established, it will create a new secure connection to the Apple Push Notification provider API through the tunnel.
8993

90-
#### Using a pool of http/2 connections
94+
### Using a pool of http/2 connections
9195

9296
Because http/2 already uses multiplexing, you probably don't need to use more than one client unless you are hitting http/2 concurrent request limits.
9397

@@ -110,7 +114,7 @@ var options = {
110114
var apnProvider = new apn.MultiProvider(options);
111115
```
112116

113-
### Sending a notification
117+
## Sending a notification
114118
To send a notification you will first need a device token from your app as a string
115119

116120
```javascript
@@ -147,66 +151,3 @@ This will result in the the following notification payload being sent to the dev
147151
You should only create one `Provider` per-process for each certificate/key pair you have. You do not need to create a new `Provider` for each notification. If you are only sending notifications to one app then there is no need for more than one `Provider`.
148152

149153
If you are constantly creating `Provider` instances in your app, make sure to call `Provider.shutdown()` when you are done with each provider to release its resources and memory.
150-
151-
## Troubleshooting
152-
153-
You are encouraged to read the extremely informative [Troubleshooting Push Notifications][tn2265] Tech Note in the first instance, in case your query is answered there.
154-
155-
## Support
156-
157-
If you have any questions or difficulties working with the module, the [node-apn Google group][googlegroup] should be your first port of call.
158-
159-
Please include as much detail as possible - especially debug logs. If the problem is reproducible, sample code is also extremely helpful. GitHub Issues should only be created for verified problems and enhancements, this will allow them to be tracked more easily.
160-
161-
## Resources
162-
163-
* [Local and Push Notification Programming Guide: APNs Overview][pl]
164-
* [Apple Technical Note: Troubleshooting Push Notifications][tn2265]
165-
* [List of Projects, Applications and Companies Using Node-apn][pacapn]
166-
167-
## Credits
168-
169-
Created by [Andrew Naylor][argon]
170-
171-
Thanks to: [Ian Babrou][bobrik], [dgthistle][dgthistle], [Keith Larsen][keithnlarsen], [Mike P][mypark], [Greg Bergé][neoziro], [Asad ur Rehman][AsadR], [Nebojsa Sabovic][nsabovic], [Alberto Gimeno][gimenete], [Randall Tombaugh][rwtombaugh], [Michael Stewart][thegreatmichael], [Olivier Louvignes][mgcrea], [porsager][porsager], [Craig Hockenberry][chockenberry]
172-
173-
## License
174-
175-
Released under the MIT License
176-
177-
> Copyright (c) 2013 Andrew Naylor
178-
>
179-
> Permission is hereby granted, free of charge, to any person obtaining a copy
180-
> of this software and associated documentation files (the "Software"), to deal
181-
> in the Software without restriction, including without limitation the rights
182-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
183-
> copies of the Software, and to permit persons to whom the Software is
184-
> furnished to do so, subject to the following conditions:
185-
>
186-
> The above copyright notice and this permission notice shall be included in
187-
> all copies or substantial portions of the Software.
188-
>
189-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
190-
191-
[npm]: https://npmjs.org
192-
[node-apn]: https://github.com/parse-community/node-apn
193-
[certificateWiki]:https://github.com/node-apn/node-apn/wiki/Preparing-Certificates "Preparing Certificates"
194-
[pl]: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html "Local and Push Notification Programming Guide: APNs Overview"
195-
[tn2265]: http://developer.apple.com/library/ios/#technotes/tn2265/_index.html "Troubleshooting Push Notifications"
196-
[googlegroup]:https://groups.google.com/group/node-apn "node-apn Google Group"
197-
[pacapn]:https://github.com/node-apn/node-apn/wiki/Projects,-Applications,-and-Companies-Using-Node-apn "List of Projects, Applications and Companies Using node-apn"
198-
[argon]: https://github.com/argon
199-
[bobrik]: https://github.com/bobrik
200-
[dgthistle]: https://github.com/dgthistle
201-
[keithnlarsen]: https://github.com/keithnlarsen
202-
[mypark]: https://github.com/mypark
203-
[neoziro]: https://github.com/neoziro
204-
[AsadR]: https://github.com/AsadR
205-
[nsabovic]: https://github.com/nsabovic
206-
[gimenete]: https://github.com/gimenete
207-
[rwtombaugh]: https://github.com/rwtombaugh
208-
[thegreatmichael]: https://github.com/thegreatmichael
209-
[mgcrea]: https://github.com/mgcrea
210-
[porsager]: https://github.com/porsager
211-
[chockenberry]: https://github.com/chockenberry
212-

0 commit comments

Comments
 (0)