Skip to content

Commit 7155d44

Browse files
authored
ci: add auto release (#199)
1 parent e0541ec commit 7155d44

16 files changed

+6204
-946
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: "\U0001F41B Report an issue"
3+
about: A feature is not working as expected.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
### New Issue Checklist
11+
<!--
12+
Check every following box [x] before submitting your issue.
13+
Click the "Preview" tab for better readability.
14+
Thanks for contributing to Parse Platform!
15+
-->
16+
17+
- [ ] I am not disclosing a [vulnerability](https://github.com/parse-community/parse-server-push-adapter/security/policy).
18+
- [ ] I am not just asking a [question](https://github.com/parse-community/.github/blob/main/SUPPORT.md).
19+
- [ ] I have searched through [existing issues](https://github.com/parse-community/parse-server-push-adapter/issues?q=is%3Aissue).
20+
- [ ] I can reproduce the issue with the latest versions of [Parse Server](https://github.com/parse-community/parse-server/releases) and the [Parse Server Push Adapter](https://github.com/parse-community/parse-server-push-adapter/releases). <!-- We don't investigate issues for outdated releases. -->
21+
22+
### Issue Description
23+
<!-- What is the specific issue? -->
24+
25+
### Steps to reproduce
26+
<!-- How can someone else reproduce the issue? -->
27+
28+
### Actual Outcome
29+
<!-- What outcome did you get? -->
30+
31+
### Expected Outcome
32+
<!-- What outcome did you expect? -->
33+
34+
### Environment
35+
<!-- Be specific with versions, don't use "latest" or semver ranges like "~x.y.z" or "^x.y.z". -->
36+
37+
Client
38+
- Parse Server Push Adapter version: `FILL_THIS_OUT`
39+
40+
Server
41+
- Parse Server version: `FILL_THIS_OUT`
42+
- Operating system: `FILL_THIS_OUT`
43+
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): `FILL_THIS_OUT`
44+
45+
Database
46+
- System (MongoDB or Postgres): `FILL_THIS_OUT`
47+
- Database version: `FILL_THIS_OUT`
48+
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): `FILL_THIS_OUT`
49+
50+
### Logs
51+
<!-- Include relevant logs here. -->
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: "\U0001F4A1 Request a feature"
3+
about: Suggest new functionality or an enhancement of existing functionality.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
### New Feature / Enhancement Checklist
11+
<!--
12+
Check every following box [x] before submitting your issue.
13+
Click the "Preview" tab for better readability.
14+
Thanks for contributing to Parse Platform!
15+
-->
16+
17+
- [ ] I am not disclosing a [vulnerability](https://github.com/parse-community/parse-server-push-adapter/security/policy).
18+
- [ ] I am not just asking a [question](https://github.com/parse-community/.github/blob/main/SUPPORT.md).
19+
- [ ] I have searched through [existing issues](https://github.com/parse-community/parse-server-push-adapter/issues?q=is%3Aissue).
20+
21+
### Current Limitation
22+
<!-- Which current limitation is the feature or enhancement addressing? -->
23+
24+
### Feature / Enhancement Description
25+
<!-- What is the concept of the functionality and how should it be implemented? -->
26+
27+
### Example Use Case
28+
<!-- What is an example use case in steps (1. / 2. / 3. / etc.) that describes the functionality? -->
29+
30+
### Alternatives / Workarounds
31+
<!-- Which alternatives or workarounds exist currently? -->
32+
33+
### 3rd Party References
34+
<!-- Have you seen a similar functionality provided somewhere else? -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 🙋🏽‍♀️ Getting help with code
4+
url: https://stackoverflow.com/questions/tagged/parse-platform
5+
about: Get help with code-level questions on Stack Overflow.
6+
- name: 🙋 Getting general help
7+
url: https://community.parseplatform.org
8+
about: Get help with other questions on our Community Forum.

.github/pull_request_template.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
### New Pull Request Checklist
2+
<!--
3+
Check every following box [x] before submitting your PR.
4+
Click the "Preview" tab for better readability.
5+
Thanks for contributing to Parse Platform!
6+
-->
7+
8+
- [ ] I am not disclosing a [vulnerability](https://github.com/parse-community/parse-server-push-adapter/security/policy).
9+
- [ ] I am creating this PR in reference to an [issue](https://github.com/parse-community/parse-server-push-adapter/issues?q=is%3Aissue).
10+
11+
### Issue Description
12+
<!-- Add a brief description of the issue this PR solves. -->
13+
14+
Related issue: #`FILL_THIS_OUT`
15+
16+
### Approach
17+
<!-- Add a description of the approach in this PR. -->
18+
19+
### TODOs before merging
20+
<!--
21+
Add TODOs that need to be completed before merging this PR.
22+
Delete TODOs that do not apply to this PR.
23+
-->
24+
25+
- [ ] Add tests
26+
- [ ] Add entry to changelog
27+
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)

.github/workflows/ci.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
11
name: ci
22
on:
33
push:
4-
branches:
5-
- master
4+
branches: [ master, release, alpha, beta ]
65
pull_request:
7-
branches:
8-
- '**'
6+
branches: [ '**' ]
97
jobs:
108
test:
119
runs-on: ubuntu-18.04
1210
timeout-minutes: 30
1311
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v1
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
- name: Setup Node
15+
uses: actions/setup-node@v2
1616
with:
17-
node-version: '10.14'
17+
node-version: 14
1818
- name: Cache Node.js modules
1919
uses: actions/cache@v2
2020
with:
2121
path: ~/.npm
2222
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2323
restore-keys: |
2424
${{ runner.os }}-node-
25-
- run: npm ci
26-
- run: npm run build
27-
- run: npm run test
28-
- run: ./node_modules/.bin/codecov -t ${{secrets.CODECOV_REPOSITORY_TOKEN}}
25+
- name: Install dependencies
26+
run: npm ci
27+
- name: Build package
28+
run: npm run build
29+
- name: Run tests
30+
run: npm run test
31+
- name: Upload code coverage
32+
run: ./node_modules/.bin/codecov -t ${{secrets.CODECOV_REPOSITORY_TOKEN}}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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.GITHUB_TOKEN }}

.github/workflows/release.yml

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

.releaserc/commit.hbs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
*{{#if scope}} **{{scope}}:**
2+
{{~/if}} {{#if subject}}
3+
{{~subject}}
4+
{{~else}}
5+
{{~header}}
6+
{{~/if}}
7+
8+
{{~!-- commit link --}} {{#if @root.linkReferences~}}
9+
([{{shortHash}}](
10+
{{~#if @root.repository}}
11+
{{~#if @root.host}}
12+
{{~@root.host}}/
13+
{{~/if}}
14+
{{~#if @root.owner}}
15+
{{~@root.owner}}/
16+
{{~/if}}
17+
{{~@root.repository}}
18+
{{~else}}
19+
{{~@root.repoUrl}}
20+
{{~/if}}/
21+
{{~@root.commit}}/{{hash}}))
22+
{{~else}}
23+
{{~shortHash}}
24+
{{~/if}}
25+
26+
{{~!-- commit references --}}
27+
{{~#if references~}}
28+
, closes
29+
{{~#each references}} {{#if @root.linkReferences~}}
30+
[
31+
{{~#if this.owner}}
32+
{{~this.owner}}/
33+
{{~/if}}
34+
{{~this.repository}}#{{this.issue}}](
35+
{{~#if @root.repository}}
36+
{{~#if @root.host}}
37+
{{~@root.host}}/
38+
{{~/if}}
39+
{{~#if this.repository}}
40+
{{~#if this.owner}}
41+
{{~this.owner}}/
42+
{{~/if}}
43+
{{~this.repository}}
44+
{{~else}}
45+
{{~#if @root.owner}}
46+
{{~@root.owner}}/
47+
{{~/if}}
48+
{{~@root.repository}}
49+
{{~/if}}
50+
{{~else}}
51+
{{~@root.repoUrl}}
52+
{{~/if}}/
53+
{{~@root.issue}}/{{this.issue}})
54+
{{~else}}
55+
{{~#if this.owner}}
56+
{{~this.owner}}/
57+
{{~/if}}
58+
{{~this.repository}}#{{this.issue}}
59+
{{~/if}}{{/each}}
60+
{{~/if}}
61+

.releaserc/footer.hbs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{#if noteGroups}}
2+
{{#each noteGroups}}
3+
4+
### {{title}}
5+
6+
{{#each notes}}
7+
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}} ([{{commit.shortHash}}]({{commit.shortHash}}))
8+
{{/each}}
9+
{{/each}}
10+
11+
{{/if}}

.releaserc/header.hbs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{{#if isPatch~}}
2+
##
3+
{{~else~}}
4+
#
5+
{{~/if}} {{#if @root.linkCompare~}}
6+
[{{version}}](
7+
{{~#if @root.repository~}}
8+
{{~#if @root.host}}
9+
{{~@root.host}}/
10+
{{~/if}}
11+
{{~#if @root.owner}}
12+
{{~@root.owner}}/
13+
{{~/if}}
14+
{{~@root.repository}}
15+
{{~else}}
16+
{{~@root.repoUrl}}
17+
{{~/if~}}
18+
/compare/{{previousTag}}...{{currentTag}})
19+
{{~else}}
20+
{{~version}}
21+
{{~/if}}
22+
{{~#if title}} "{{title}}"
23+
{{~/if}}
24+
{{~#if date}} ({{date}})
25+
{{/if}}

.releaserc/template.hbs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{> header}}
2+
3+
{{#each commitGroups}}
4+
5+
{{#if title}}
6+
### {{title}}
7+
8+
{{/if}}
9+
{{#each commits}}
10+
{{> commit root=@root}}
11+
{{/each}}
12+
{{/each}}
13+
14+
{{> footer}}

0 commit comments

Comments
 (0)