Skip to content

Commit 33dcf6d

Browse files
authored
build: release 5.0
2 parents 50072bd + b2a2a7e commit 33dcf6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+9168
-2540
lines changed

.babelrc

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
["@babel/preset-env", {
88
"targets": {
99
"node": "12"
10-
},
11-
"exclude": ["proposal-dynamic-import"]
10+
}
1211
}]
1312
],
1413
"sourceMaps": "inline"

.github/pull_request_template.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ Related issue: FILL_THIS_OUT
2222
Delete suggested TODOs that do not apply to this PR.
2323
-->
2424

25-
- [ ] Add test cases
26-
- [ ] Add entry to changelog
25+
- [ ] Add tests
2726
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)
2827
- [ ] Add [security check](https://github.com/parse-community/parse-server/blob/master/CONTRIBUTING.md#security-checks)
2928
- [ ] Add new Parse Error codes to Parse JS SDK <!-- no hard-coded error codes in Parse Server -->
30-
- [ ] ...
29+
- [x] A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

.github/workflows/ci.yml

+18-12
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: ci
22
on:
33
push:
4-
branches:
5-
- release
4+
branches: [ release, alpha, beta, next-major ]
65
pull_request:
76
branches:
87
- '**'
@@ -31,13 +30,6 @@ jobs:
3130
run: npm ci
3231
- name: CI Node Engine Check
3332
run: npm run ci:checkNodeEngine
34-
check-changelog:
35-
name: Changelog
36-
timeout-minutes: 5
37-
runs-on: ubuntu-18.04
38-
steps:
39-
- uses: actions/checkout@v2
40-
- uses: dangoslen/changelog-enforcer@v2
4133
check-lint:
4234
name: Lint
4335
timeout-minutes: 15
@@ -80,12 +72,21 @@ jobs:
8072
- run: npm run madge:circular
8173
check-docker:
8274
name: Docker Build
83-
timeout-minutes: 5
75+
timeout-minutes: 15
8476
runs-on: ubuntu-18.04
8577
steps:
86-
- uses: actions/checkout@v2
78+
- name: Checkout repository
79+
uses: actions/checkout@v2
80+
- name: Set up QEMU
81+
id: qemu
82+
uses: docker/setup-qemu-action@v1
83+
- name: Set up Docker Buildx
84+
uses: docker/setup-buildx-action@v1
8785
- name: Build docker image
8886
uses: docker/build-push-action@v2
87+
with:
88+
context: .
89+
platforms: linux/amd64
8990
check-lock-file-version:
9091
name: NPM Lock File Version
9192
timeout-minutes: 5
@@ -192,6 +193,9 @@ jobs:
192193
- name: PostgreSQL 13, PostGIS 3.1
193194
POSTGRES_IMAGE: postgis/postgis:13-3.1
194195
NODE_VERSION: 14.18.1
196+
- name: PostgreSQL 14, PostGIS 3.1
197+
POSTGRES_IMAGE: postgis/postgis:14-3.1
198+
NODE_VERSION: 14.18.1
195199
fail-fast: false
196200
name: ${{ matrix.name }}
197201
timeout-minutes: 15
@@ -231,7 +235,9 @@ jobs:
231235
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
232236
- name: Install dependencies
233237
run: npm ci
234-
- run: bash scripts/before_script_postgres.sh
238+
- run: |
239+
bash scripts/before_script_postgres_conf.sh
240+
bash scripts/before_script_postgres.sh
235241
- run: npm run coverage
236242
env:
237243
CI: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# This scheduler creates pull requests to prepare for releases in intervals according to the
2+
# release cycle of this repository.
3+
4+
name: release-automated-scheduler
5+
on:
6+
# Scheduler temporarily disabled until stable release of Parse Server 5 with all branches (alpha, beta, release) created
7+
# schedule:
8+
# - cron: 0 0 1 * *
9+
workflow_dispatch:
10+
11+
jobs:
12+
create-pr-release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout beta branch
16+
uses: actions/checkout@v2
17+
with:
18+
ref: beta
19+
- name: Compose branch name for PR
20+
id: branch
21+
run: echo "::set-output name=name::build-release-${{ github.run_id }}${{ github.run_number }}"
22+
- name: Create branch
23+
run: |
24+
git config --global user.email ${{ github.actor }}@users.noreply.github.com
25+
git config --global user.name ${{ github.actor }}
26+
git checkout -b ${{ steps.branch.outputs.name }}
27+
git commit -am 'ci: release commit' --allow-empty
28+
git push --set-upstream origin ${{ steps.branch.outputs.name }}
29+
- name: Create PR
30+
uses: k3rnels-actions/pr-update@v1
31+
with:
32+
token: ${{ secrets.GITHUB_TOKEN }}
33+
pr_title: "build: release"
34+
pr_source: ${{ steps.branch.outputs.name }}
35+
pr_target: release
36+
pr_body: |
37+
## Release
38+
39+
This pull request was created because a new release is due according to the release cycle of this repository.
40+
Just resolve any conflicts and it's good to merge. Any version increment will be done by release automation.
41+
42+
*⚠️ Use `Merge commit` to merge this pull request. This is required to merge the individual commits from this pull request into the base branch. Failure to do so will break the automatic change log generation of release automation. Do not use "Squash and merge"!*
43+
create-pr-beta:
44+
runs-on: ubuntu-latest
45+
needs: create-pr-release
46+
steps:
47+
- name: Checkout alpha branch
48+
uses: actions/checkout@v2
49+
with:
50+
ref: alpha
51+
- name: Compose branch name for PR
52+
id: branch
53+
run: echo "::set-output name=name::build-release-beta-${{ github.run_id }}${{ github.run_number }}"
54+
- name: Create branch
55+
run: |
56+
git config --global user.email ${{ github.actor }}@users.noreply.github.com
57+
git config --global user.name ${{ github.actor }}
58+
git checkout -b ${{ steps.branch.outputs.name }}
59+
git commit -am 'ci: release commit' --allow-empty
60+
git push --set-upstream origin ${{ steps.branch.outputs.name }}
61+
- name: Create PR
62+
uses: k3rnels-actions/pr-update@v1
63+
with:
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
pr_title: "build: release beta"
66+
pr_source: ${{ steps.branch.outputs.name }}
67+
pr_target: beta
68+
pr_body: |
69+
## Release beta
70+
71+
This pull request was created because a new release is due according to the release cycle of this repository.
72+
Just resolve any conflicts and it's good to merge. Any version increment will be done by release automation.
73+
74+
*⚠️ Use `Merge commit` to merge this pull request. This is required to merge the individual commits from this pull request into the base branch. Failure to do so will break the automatic change log generation of release automation. Do not use "Squash and merge"!*
+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 ]
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/release.yml

-64
This file was deleted.

.madgerc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"detectiveOptions": {
3+
"ts": {
4+
"skipTypeImports": true
5+
},
6+
"es6": {
7+
"skipTypeImports": true
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)