Skip to content

Commit b0f16be

Browse files
authored
Merge branch 'release-4.x.x' into add-mongodb-5-ci
2 parents edf1761 + 6f25ea9 commit b0f16be

13 files changed

+5033
-238
lines changed
+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: release-automated
2+
on:
3+
push:
4+
branches: [ release, alpha, beta, next-major, release-4.x.x ]
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
current_tag: ${{ steps.tag.outputs.current_tag }}
10+
trigger_branch: ${{ steps.branch.outputs.trigger_branch }}
11+
steps:
12+
- name: Determine trigger branch name
13+
id: branch
14+
run: echo "::set-output name=trigger_branch::${GITHUB_REF#refs/*/}"
15+
- uses: actions/checkout@v2
16+
with:
17+
persist-credentials: false
18+
- uses: actions/setup-node@v2
19+
with:
20+
node-version: 14
21+
registry-url: https://registry.npmjs.org/
22+
- name: Cache Node.js modules
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.npm
26+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
27+
restore-keys: |
28+
${{ runner.os }}-node-
29+
- run: npm ci
30+
- run: npx semantic-release
31+
env:
32+
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35+
- name: Determine tag on current commit
36+
id: tag
37+
run: echo "::set-output name=current_tag::$(git describe --tags --abbrev=0 --exact-match || echo '')"
38+
39+
docker:
40+
needs: release
41+
if: needs.release.outputs.current_tag != ''
42+
env:
43+
REGISTRY: docker.io
44+
IMAGE_NAME: parseplatform/parse-server
45+
runs-on: ubuntu-18.04
46+
permissions:
47+
contents: read
48+
packages: write
49+
steps:
50+
- name: Determine branch name
51+
id: branch
52+
run: echo "::set-output name=branch_name::${GITHUB_REF#refs/*/}"
53+
- name: Checkout repository
54+
uses: actions/checkout@v2
55+
with:
56+
ref: ${{ needs.release.outputs.current_tag }}
57+
- name: Set up QEMU
58+
id: qemu
59+
uses: docker/setup-qemu-action@v1
60+
- name: Set up Docker Buildx
61+
uses: docker/setup-buildx-action@v1
62+
- name: Log into Docker Hub
63+
if: github.event_name != 'pull_request'
64+
uses: docker/login-action@v1
65+
with:
66+
username: ${{ secrets.DOCKERHUB_USERNAME }}
67+
password: ${{ secrets.DOCKERHUB_TOKEN }}
68+
- name: Extract Docker metadata
69+
id: meta
70+
uses: docker/metadata-action@v3
71+
with:
72+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
73+
flavor: |
74+
latest=${{ steps.branch.outputs.branch_name == 'release' }}
75+
tags: |
76+
type=semver,pattern={{version}},value=${{ needs.release.outputs.current_tag }}
77+
- name: Build and push Docker image
78+
uses: docker/build-push-action@v2
79+
with:
80+
context: .
81+
platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8
82+
push: ${{ github.event_name != 'pull_request' }}
83+
tags: ${{ steps.meta.outputs.tags }}
84+
labels: ${{ steps.meta.outputs.labels }}
85+
86+
docs:
87+
needs: release
88+
if: needs.release.outputs.current_tag != '' && github.ref == 'refs/heads/release'
89+
runs-on: ubuntu-18.04
90+
timeout-minutes: 15
91+
steps:
92+
- uses: actions/checkout@v2
93+
- name: Use Node.js
94+
uses: actions/setup-node@v1
95+
with:
96+
node-version: 14
97+
- name: Cache Node.js modules
98+
uses: actions/cache@v2
99+
with:
100+
path: ~/.npm
101+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
102+
restore-keys: |
103+
${{ runner.os }}-node-
104+
- name: Generate Docs
105+
run: |
106+
echo $SOURCE_TAG
107+
npm ci
108+
./release_docs.sh
109+
env:
110+
SOURCE_TAG: ${{ needs.release.outputs.current_tag }}
111+
- name: Deploy
112+
uses: peaceiris/[email protected]
113+
with:
114+
github_token: ${{ secrets.GITHUB_TOKEN }}
115+
publish_dir: ./docs

.github/workflows/docker-publish.yml renamed to .github/workflows/release-manual-docker.yml

+15-18
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,52 @@
1-
name: docker
1+
# Trigger this workflow only to manually create a Docker release; this should only be used
2+
# in extraordinary circumstances, as Docker releases are normally created automatically as
3+
# part of the automated release workflow.
24

5+
name: release-manual-docker
36
on:
4-
schedule:
5-
# Nightly builds capture upstream updates to dependency images such as node.
6-
- cron: '19 17 * * *'
7-
push:
8-
branches: [ master ]
9-
tags: [ '*.*.*' ]
10-
7+
workflow_dispatch:
8+
inputs:
9+
ref:
10+
default: ''
11+
description: 'Reference (tag / SHA):'
1112
env:
1213
REGISTRY: docker.io
1314
IMAGE_NAME: parseplatform/parse-server
14-
1515
jobs:
1616
build:
17-
1817
runs-on: ubuntu-18.04
1918
permissions:
2019
contents: read
2120
packages: write
22-
2321
steps:
2422
- name: Determine branch name
2523
id: branch
2624
run: echo "::set-output name=branch_name::${GITHUB_REF#refs/*/}"
27-
2825
- name: Checkout repository
2926
uses: actions/checkout@v2
30-
27+
with:
28+
ref: ${{ github.event.inputs.ref }}
3129
- name: Set up QEMU
3230
id: qemu
3331
uses: docker/setup-qemu-action@v1
34-
3532
- name: Set up Docker Buildx
3633
uses: docker/setup-buildx-action@v1
37-
3834
- name: Log into Docker Hub
3935
if: github.event_name != 'pull_request'
4036
uses: docker/login-action@v1
4137
with:
4238
username: ${{ secrets.DOCKERHUB_USERNAME }}
4339
password: ${{ secrets.DOCKERHUB_TOKEN }}
44-
4540
- name: Extract Docker metadata
4641
id: meta
4742
uses: docker/metadata-action@v3
4843
with:
4944
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5045
flavor: |
51-
latest=${{ steps.branch.outputs.branch_name == 'master' }}
52-
46+
latest=${{ steps.branch.outputs.branch_name == 'release' && github.event.inputs.ref == '' }}
47+
tags: |
48+
type=semver,enable=true,pattern={{version}},value=${{ github.event.inputs.ref }}
49+
type=raw,enable=${{ github.event.inputs.ref == '' }},value=latest
5350
- name: Build and push Docker image
5451
uses: docker/build-push-action@v2
5552
with:

.github/workflows/release.yml

-63
This file was deleted.

.releaserc/commit.hbs

+61
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

+11
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

+25
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

+14
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}}

CHANGELOG.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# Parse Server Changelog
2-
3-
## 4.10.4
1+
# 4.10.4
42
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.10.3...4.10.4)
53

6-
### Security Fixes
4+
## Security Fixes
75
- Strip out sessionToken when LiveQuery is used on Parse.User (Daniel Blyth) [GHSA-7pr3-p5fm-8r9x](https://github.com/parse-community/parse-server/security/advisories/GHSA-7pr3-p5fm-8r9x)
86

97
# 4.10.3

0 commit comments

Comments
 (0)