Skip to content

Commit cc1b8f5

Browse files
authored
Merge pull request #738 from newfold-labs/update/release-prep-workflow
Update release prep workflow
2 parents 2ea46d0 + 743a6a6 commit cc1b8f5

File tree

7 files changed

+25397
-278
lines changed

7 files changed

+25397
-278
lines changed

.github/scripts/set-version-bump.js

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

.github/workflows/newfold-prep-release.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,30 @@ on:
44
workflow_dispatch:
55
inputs:
66
level:
7-
description: The level of release to be used.
7+
description: 'The level of release to be used.'
88
type: choice
99
options:
10-
- patch
11-
- minor
12-
- major
10+
- 'patch'
11+
- 'minor'
12+
- 'major'
1313
default: 'patch'
1414
required: true
15+
# Disable permissions for all available scopes by default.
16+
# Any needed permissions should be configured at the job level.
17+
permissions: {}
1518

1619
jobs:
1720

18-
# This job is used to extract the branch name from the pull request or branch.
19-
setup:
20-
name: Setup
21-
runs-on: ubuntu-latest
22-
outputs:
23-
branch: ${{ steps.extract_branch.outputs.branch }}
24-
steps:
25-
- name: Extract branch name
26-
shell: bash
27-
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
28-
id: extract_branch
29-
3021
# This job runs the newfold module-prep-release workflow for this module.
3122
prep-release:
3223
name: Prepare Release
33-
needs: setup
34-
uses: newfold-labs/workflows/.github/workflows/module-prep-release.yml@add/preprelease
24+
permissions:
25+
contents: write
26+
pull-requests: write
27+
uses: newfold-labs/workflows/.github/workflows/reusable-module-prep-release.yml@main
3528
with:
3629
module-repo: ${{ github.repository }}
37-
module-branch: ${{ needs.setup.outputs.branch }}
30+
module-branch: 'trunk'
3831
level: ${{ inputs.level }}
39-
secrets: inherit
32+
json-file: 'package.json'
33+
php-file: 'bootstrap.php'

.github/workflows/prep-release.yml

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

.github/workflows/prepare-release.yml

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

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ The Onboarding module is designed to streamline various tasks related to user on
7777
- Generate screenshots tailored to the user's preferences and create a child theme using the provided name.
7878

7979
## Release Process
80-
### Local Release Preparation
80+
81+
Run the `Newfold Prepare Release` github action to automatically bump the version (either patch, minor or major version), and update build and language files all at once. It will create a PR with changed files for review. Using this workflow, we can skip all the manual steps below.
82+
83+
### Manual Release Preparation
8184

8285
1. **Checkout the trunk branch locally:**
8386
```bash
@@ -89,25 +92,28 @@ The Onboarding module is designed to streamline various tasks related to user on
8992
git pull origin trunk
9093
```
9194

95+
3. **Create release branch, where [x.y.z] is the new version (following Semantic Versioning):**
96+
```bash
97+
git branch release/[x.y.z]
98+
```
99+
92100
3. **Test for any breaking changes and highlight concerns:**
93101
- **Conduct thorough testing to ensure stability and functionality.**
94102
- Note any issues or concerns for further action.
95103

96104
4. **Increment Version via script**
97-
- run `npm run set-version-bump`
98-
- This will update the version number in required files, remove the old build, and create a fresh build.
99-
- Alternatively, update versions and rebuild manually:
100-
1. **Increment version following Semantic Versioning 2.0.0:**
105+
- Update versions and rebuild manually:
106+
1. **Increment version [x.y.z]**
101107
- Update version in:
102108
- `bootstrap.php`
103109
- `package.json`
104-
- `package-lock.json`
105110
- Run:
106111
```bash
107112
npm install
108113
npm run build
109114
```
110115
- Verify existence of `build/<new_version>` folder.
116+
- Remove previous release build files: `build/<old_version>` folder.
111117
- Update language files. Run: `composer run i18n`.
112118

113119
5. **Push changes to origin:**

0 commit comments

Comments
 (0)