Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Release #9186

Merged
merged 16 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,10 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
- name: Install dependencies
- name: Install prod dependencies
run: npm ci
- name: Remove dev dependencies
run: ./ci/uninstallDevDeps.sh @actions/core
- name: CI Node Engine Check
run: npm run ci:checkNodeEngine
check-lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-automated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 18.20.0
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Cache Node.js modules
uses: actions/cache@v4
Expand Down
25 changes: 16 additions & 9 deletions release.config.js → .releaserc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
* Semantic Release Config
*/

const fs = require('fs').promises;
const path = require('path');
const { readFile } = require('fs').promises;
const { resolve } = require('path');

// For ES6 modules use:
// import { readFile } from 'fs/promises';
// import { resolve, dirname } from 'path';
// import { fileURLToPath } from 'url';

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

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

// Set changelog file
Expand Down Expand Up @@ -89,7 +94,7 @@ async function config() {
[
"@saithodev/semantic-release-backmerge",
{
"branches": [
"backmergeBranches": [
{ from: "beta", to: "alpha" },
{ from: "release", to: "beta" },
]
Expand All @@ -103,15 +108,17 @@ async function config() {

async function loadTemplates() {
for (const template of Object.keys(templates)) {
const text = await readFile(path.resolve(__dirname, resourcePath, templates[template].file));

// For ES6 modules use:
// const fileUrl = import.meta.url;
// const __dirname = dirname(fileURLToPath(fileUrl));

const filePath = resolve(__dirname, resourcePath, templates[template].file);
const text = await readFile(filePath, 'utf-8');
templates[template].text = text;
}
}

async function readFile(filePath) {
return await fs.readFile(filePath, 'utf-8');
}

function getReleaseComment() {
const url = repositoryUrl + '/releases/tag/${nextRelease.gitTag}';
const comment = '🎉 This change has been released in version [${nextRelease.version}](' + url + ')';
Expand Down
28 changes: 28 additions & 0 deletions changelogs/CHANGELOG_alpha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# [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)


### Features

* 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.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)


### Features

* 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))

# [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)


### Features

* 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))

# [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)


### Bug Fixes

* 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.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)


Expand Down
22 changes: 22 additions & 0 deletions ci/uninstallDevDeps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Read package exclusion list from arguments
exclusionList=("$@")

# Convert exclusion list to grep pattern
exclusionPattern=$(printf "|%s" "${exclusionList[@]}")
exclusionPattern=${exclusionPattern:1}

# Get list of all dev dependencies
devDeps=$(jq -r '.devDependencies | keys | .[]' package.json)

# Filter out exclusion list
depsToUninstall=$(echo "$devDeps" | grep -Ev "$exclusionPattern")

# If there are dependencies to uninstall then uninstall them
if [ -n "$depsToUninstall" ]; then
echo "Uninstalling dev dependencies: $depsToUninstall"
npm uninstall $depsToUninstall
else
echo "No dev dependencies to uninstall"
fi
Loading
Loading