Skip to content

Commit 6f2fc44

Browse files
authored
build: Release (#9189)
2 parents 4906644 + c696e1e commit 6f2fc44

26 files changed

+8109
-5832
lines changed

.github/workflows/ci.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,10 @@ jobs:
4242
uses: actions/setup-node@v4
4343
with:
4444
node-version: ${{ matrix.node-version }}
45-
- name: Cache Node.js modules
46-
uses: actions/cache@v4
47-
with:
48-
path: ~/.npm
49-
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
50-
restore-keys: |
51-
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
52-
- name: Install dependencies
45+
- name: Install prod dependencies
5346
run: npm ci
47+
- name: Remove dev dependencies
48+
run: ./ci/uninstallDevDeps.sh @actions/core
5449
- name: CI Node Engine Check
5550
run: npm run ci:checkNodeEngine
5651
check-lint:

.github/workflows/release-automated.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
persist-credentials: false
1818
- uses: actions/setup-node@v4
1919
with:
20-
node-version: 18.20.0
20+
node-version: 20
2121
registry-url: https://registry.npmjs.org/
2222
- name: Cache Node.js modules
2323
uses: actions/cache@v4

release.config.js renamed to .releaserc.js

+16-9
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
* Semantic Release Config
33
*/
44

5-
const fs = require('fs').promises;
6-
const path = require('path');
5+
const { readFile } = require('fs').promises;
6+
const { resolve } = require('path');
7+
8+
// For ES6 modules use:
9+
// import { readFile } from 'fs/promises';
10+
// import { resolve, dirname } from 'path';
11+
// import { fileURLToPath } from 'url';
712

813
// Get env vars
914
const ref = process.env.GITHUB_REF;
@@ -24,7 +29,7 @@ const templates = {
2429
async function config() {
2530

2631
// Get branch
27-
const branch = ref.split('/').pop().split('-')[0];
32+
const branch = ref?.split('/')?.pop()?.split('-')[0] || '(current branch could not be determined)';
2833
console.log(`Running on branch: ${branch}`);
2934

3035
// Set changelog file
@@ -89,7 +94,7 @@ async function config() {
8994
[
9095
"@saithodev/semantic-release-backmerge",
9196
{
92-
"branches": [
97+
"backmergeBranches": [
9398
{ from: "beta", to: "alpha" },
9499
{ from: "release", to: "beta" },
95100
]
@@ -103,15 +108,17 @@ async function config() {
103108

104109
async function loadTemplates() {
105110
for (const template of Object.keys(templates)) {
106-
const text = await readFile(path.resolve(__dirname, resourcePath, templates[template].file));
111+
112+
// For ES6 modules use:
113+
// const fileUrl = import.meta.url;
114+
// const __dirname = dirname(fileURLToPath(fileUrl));
115+
116+
const filePath = resolve(__dirname, resourcePath, templates[template].file);
117+
const text = await readFile(filePath, 'utf-8');
107118
templates[template].text = text;
108119
}
109120
}
110121

111-
async function readFile(filePath) {
112-
return await fs.readFile(filePath, 'utf-8');
113-
}
114-
115122
function getReleaseComment() {
116123
const url = repositoryUrl + '/releases/tag/${nextRelease.gitTag}';
117124
const comment = '🎉 This change has been released in version [${nextRelease.version}](' + url + ')';

changelogs/CHANGELOG_alpha.md

+28
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
# [7.1.0-alpha.16](https://github.com/parse-community/parse-server/compare/7.1.0-alpha.15...7.1.0-alpha.16) (2024-07-08)
2+
3+
4+
### Features
5+
6+
* Add support for dot notation on array fields of Parse Object ([#9115](https://github.com/parse-community/parse-server/issues/9115)) ([cf4c880](https://github.com/parse-community/parse-server/commit/cf4c8807b9da87a0a5f9c94e5bdfcf17cda80cf4))
7+
8+
# [7.1.0-alpha.15](https://github.com/parse-community/parse-server/compare/7.1.0-alpha.14...7.1.0-alpha.15) (2024-07-08)
9+
10+
11+
### Features
12+
13+
* Upgrade to @parse/push-adapter 6.4.0 ([#9182](https://github.com/parse-community/parse-server/issues/9182)) ([ef1634b](https://github.com/parse-community/parse-server/commit/ef1634bf1f360429108d29b08032fc7961ff96a1))
14+
15+
# [7.1.0-alpha.14](https://github.com/parse-community/parse-server/compare/7.1.0-alpha.13...7.1.0-alpha.14) (2024-07-07)
16+
17+
18+
### Features
19+
20+
* Upgrade to Parse JS SDK 5.3.0 ([#9180](https://github.com/parse-community/parse-server/issues/9180)) ([dca187f](https://github.com/parse-community/parse-server/commit/dca187f91b93cbb362b22a3fb9ee38451799ff13))
21+
22+
# [7.1.0-alpha.13](https://github.com/parse-community/parse-server/compare/7.1.0-alpha.12...7.1.0-alpha.13) (2024-07-01)
23+
24+
25+
### Bug Fixes
26+
27+
* Invalid push notification tokens are not cleaned up from database for FCM API v2 ([#9173](https://github.com/parse-community/parse-server/issues/9173)) ([284da09](https://github.com/parse-community/parse-server/commit/284da09f4546356b37511a589fb5f64a3efffe79))
28+
129
# [7.1.0-alpha.12](https://github.com/parse-community/parse-server/compare/7.1.0-alpha.11...7.1.0-alpha.12) (2024-06-30)
230

331

changelogs/CHANGELOG_beta.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# [7.2.0-beta.1](https://github.com/parse-community/parse-server/compare/7.1.0...7.2.0-beta.1) (2024-07-09)
2+
3+
4+
### Bug Fixes
5+
6+
* Invalid push notification tokens are not cleaned up from database for FCM API v2 ([#9173](https://github.com/parse-community/parse-server/issues/9173)) ([284da09](https://github.com/parse-community/parse-server/commit/284da09f4546356b37511a589fb5f64a3efffe79))
7+
8+
### Features
9+
10+
* Add support for dot notation on array fields of Parse Object ([#9115](https://github.com/parse-community/parse-server/issues/9115)) ([cf4c880](https://github.com/parse-community/parse-server/commit/cf4c8807b9da87a0a5f9c94e5bdfcf17cda80cf4))
11+
* Upgrade to @parse/push-adapter 6.4.0 ([#9182](https://github.com/parse-community/parse-server/issues/9182)) ([ef1634b](https://github.com/parse-community/parse-server/commit/ef1634bf1f360429108d29b08032fc7961ff96a1))
12+
* Upgrade to Parse JS SDK 5.3.0 ([#9180](https://github.com/parse-community/parse-server/issues/9180)) ([dca187f](https://github.com/parse-community/parse-server/commit/dca187f91b93cbb362b22a3fb9ee38451799ff13))
13+
114
# [7.1.0-beta.1](https://github.com/parse-community/parse-server/compare/7.0.0...7.1.0-beta.1) (2024-06-30)
215

316

ci/uninstallDevDeps.sh

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
# Read package exclusion list from arguments
4+
exclusionList=("$@")
5+
6+
# Convert exclusion list to grep pattern
7+
exclusionPattern=$(printf "|%s" "${exclusionList[@]}")
8+
exclusionPattern=${exclusionPattern:1}
9+
10+
# Get list of all dev dependencies
11+
devDeps=$(jq -r '.devDependencies | keys | .[]' package.json)
12+
13+
# Filter out exclusion list
14+
depsToUninstall=$(echo "$devDeps" | grep -Ev "$exclusionPattern")
15+
16+
# If there are dependencies to uninstall then uninstall them
17+
if [ -n "$depsToUninstall" ]; then
18+
echo "Uninstalling dev dependencies: $depsToUninstall"
19+
npm uninstall $depsToUninstall
20+
else
21+
echo "No dev dependencies to uninstall"
22+
fi

0 commit comments

Comments
 (0)