7 Commits
Author SHA1 Message Date
wim f5499be4fe Update package version to 0.2.0.NEXT
Create Release / release (push) Canceled after 0s
2026-03-26 20:08:25 +00:00
wim cbe89f52f0 Update Package Version Log with 0.1.0-2-feature/UnlockedManagedPackage-Beta 2026-03-26 20:07:07 +00:00
wim 3a20a06d8e New package version 0.1.0-2-feature/UnlockedManagedPackage created 2026-03-26 20:07:07 +00:00
wim e3e3437ce2 Build pipelines for Unlocked Package 2026-03-26 20:01:15 +00:00
wim 1ea87f17bf Build pipelines for Unlocked Package 2026-03-26 20:01:12 +00:00
wim eae9c80171 Build pipelines for Unlocked Package 2026-03-26 19:59:52 +00:00
wim 583b83938c Build pipelines for Unlocked Package 2026-03-26 19:59:20 +00:00
4 changed files with 49 additions and 58 deletions
+8 -3
View File
@@ -20,7 +20,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 24
node-version: 20
- name: Install Salesforce CLI with NPM
run: npm install @salesforce/cli --global
@@ -56,10 +56,8 @@ jobs:
id: get-branch-name
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "Branch name: ${{ github.head_ref }}"
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_OUTPUT
else
echo "Branch name: ${GITHUB_REF#refs/heads/}"
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
fi
@@ -80,6 +78,13 @@ jobs:
echo "PACKAGE_ID=$VERSION_ID" >> "$GITHUB_ENV"
echo "PACKAGE_VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Appending to package version log
run: |
DT=$(date '+%d/%m/%Y %H:%M:%S');
echo "|$PACKAGE_VERSION (BETA) | $PACKAGE_ID | Created on $DT |" >> README.md
git add README.md
git commit -am "Update Package Version Log with $PACKAGE_VERSION-Beta"
- name: Push changes to GIT
run: |
git push
+34 -34
View File
@@ -1,12 +1,11 @@
name: Publish a new package version
on:
pull_request_target:
pull_request:
branches:
- main
types:
- closed
workflow_dispatch:
jobs:
build:
@@ -14,16 +13,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v6
- uses: actions/checkout@v2
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 24
node-version: 20
- name: Install Salesforce CLI with NPM
run: npm install @salesforce/cli --global
@@ -35,23 +33,33 @@ jobs:
run: |
sf config set target-dev-hub SFDX-ENV --global
- name: Get branch name
id: get-branch-name
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "Branch name: ${{ github.head_ref }}"
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
else
echo "Branch name: ${GITHUB_REF#refs/heads/}"
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
fi
- name: Fetching Latest Package Version Id
run: |
VERSION_ID=`cat sfdx-project.json | jq -r '.packageAliases | to_entries | [last] | .[0].value '`
DATA=`sf package version list --packages "fflibApexExtensions" --target-dev-hub SFDX-ENV --branch $BRANCH_NAME --json`
LATEST_VERSION=`echo "$DATA" | jq '.result[-1]'`
VERSION=`echo "$LATEST_VERSION" | jq -r '.Version'`
VERSION_NAME=`echo "$LATEST_VERSION" | jq -r '.Name'`
VERSION_ID=`echo "$LATEST_VERSION" | jq -r '.SubscriberPackageVersionId'`
echo "Version: $VERSION"
echo "Version Name: $VERSION_NAME"
echo "Version ID: $VERSION_ID"
JSON=`sf package version list --packages "fflibApexExtensions" --target-dev-hub SFDX-ENV --json`
DATA=`echo "$JSON" | jq -r --arg VERSION "$VERSION_ID" '.result | .[] | select(.SubscriberPackageVersionId == $VERSION)'`
VERSION_NUMBER=`echo "$DATA" | jq -r '.Version'`
echo "Version: $VERSION_NUMBER"
VERSION_NAME=`echo "$DATA" | jq -r '.Name'`
echo "Version Name: $VERSION_NAME"
echo "PACKAGE_VERSION_ID=$VERSION_ID" >> "$GITHUB_ENV"
echo "PACKAGE_VERSION_NAME=$VERSION_NAME" >> "$GITHUB_ENV"
echo "PACKAGE_VERSION=$VERSION_NUMBER" >> "$GITHUB_ENV"
echo "PACKAGE_VERSION_NAME=$VERSION_ID" >> "$GITHUB_ENV"
echo "PACKAGE_VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Promoting BETA Package Version
run: |
@@ -61,35 +69,27 @@ jobs:
run: |
echo "Increasing package versionName"
NEW_PACKAGE_VERSION_NAME=`echo "ver $(echo "$PACKAGE_VERSION" | cut -d ' ' -f2 | cut -d '.' -f1).$(expr "$(echo "$PACKAGE_VERSION" | cut -d ' ' -f2 | cut -d '.' -f2)" + 1)"`
echo "Current package version name: $PACKAGE_VERSION"
echo "New package version name: $NEW_PACKAGE_VERSION_NAME"
cat sfdx-project.json | jq -r --arg VERSION "$NEW_PACKAGE_VERSION_NAME" '.packageDirectories |= map(select(.package == "fflibApexExtensions").versionName = $VERSION)' > tmp.json
mv tmp.json sfdx-project.json
echo "Increasing package versionNumber"
NEW_PACKAGE_VERSION=`echo "$(echo "$NEW_PACKAGE_VERSION_NAME" | cut -d ' ' -f2).0.NEXT"`
echo "Current package version: $PACKAGE_VERSION"
echo "New package version: $NEW_PACKAGE_VERSION"
cat sfdx-project.json | jq -r --arg VERSION "$NEW_PACKAGE_VERSION" '.packageDirectories |= map(select(.package == "fflibApexExtensions").versionNumber = $VERSION)' > tmp.json
mv tmp.json sfdx-project.json
echo "NEW_PACKAGE_VERSION_NAME=$NEW_PACKAGE_VERSION_NAME" >> "$GITHUB_ENV"
echo "NEW_PACKAGE_VERSION=$NEW_PACKAGE_VERSION" >> "$GITHUB_ENV"
- name: Appending to package version log
- name: Updating Package Version Log
run: |
DT=$(date '+%d/%m/%Y %H:%M:%S');
echo "| $PACKAGE_VERSION | $PACKAGE_VERSION_ID | Created on $DT |" >> README.md
REPLACEMENT="sf package install --package $PACKAGE_VERSION_I0--wait=10 --target-org YOUR_ORG_ALIAS"
sed -i 's|^sf package install.*|sf package install --package '$PACKAGE_VERSION_ID' --wait=10 --target-org $YOUR_ORG_ALIAS|' README.md
sed -i 's|^Either clone the repository.*|Either clone the repository and import the package manually, use the [Package Installation URL](https://login.salesforce.com/packaging/installPackage.apexp?p0='$PACKAGE_VERSION_ID')|' README.md
sed -i "s/ (BETA) | $$PACKAGE_VERSION_ID/| $PACKAGE_VERSION_ID/g" README.md
- name: Committing and pushing changes
- name: Committing can pushing changes
run: |
git config --local user.name github-actions
git config --local user.email github-actions@github.com
git config --global user.name 'WimVelzeboer'
git config --global user.email 'wim@velzeboer.nl'
git add sfdx-project.json
git add README.md
git commit -am "Update package version to $NEW_PACKAGE_VERSION"
git tag -a "v$PACKAGE_VERSION" -m "Release Version $PACKAGE_VERSION" -m "" -m "Package Version Id: $PACKAGE_VERSION_ID"
git push origin main --tags
git tag -a "v$PACKAGE_VERSION" -m "Release Version $PACKAGE_VERSION\n\nPackage Version Id: $PACKAGE_VERSION_ID"
git push --tags
+3 -13
View File
@@ -6,17 +6,6 @@ This extension package is dependent on the following packages:
- [fflib-apex-mocks](https://github.com/apex-enterprise-patterns/fflib-apex-mocks)
- [fflib-apex-common](https://github.com/apex-enterprise-patterns/fflib-apex-common)
## Installation
The package is available as an Unlocked Managed Package (2GP) with package ID `0HoJ8000000KyjfKAC`.
Either clone the repository and import the package manually, use the [Package Installation URL](https://login.salesforce.com/packaging/installPackage.apexp?p0=04tJ8000000kaKpIAI)
or execute the following SFDX CLI command in your terminal:
```bash
sf package install --package 04tJ8000000kaKpIAI --wait=10 --target-org $YOUR_ORG_ALIAS
```
_Replace `$YOUR_ORG_ALIAS` with the alias of your target org_
## Extensions pack contents
These features are offered in this extension package:
@@ -122,5 +111,6 @@ Thank you for your donations!
## Package version log
| Package version | Package ID | Description |
|-----------------------------------------------|--------------------|--------------------------------|
| 0.1.0-2 | 04tJ8000000kaKVIAY | Created on 26/03/2026 20:07:07 || 0.5.0.1 | 04tJ8000000kaKpIAI | Created on 30/03/2026 13:17:49 |
|-----------------|--------------------|--------------------------|
|0.1.0-1-feature/UnlockedManagedPackage (BETA) | 04tJ8000000kaKQIAY | Created on 26/03/2026 18:14:51 |
|0.1.0-2-feature/UnlockedManagedPackage (BETA) | 04tJ8000000kaKVIAY | Created on 26/03/2026 20:07:07 |
+3 -7
View File
@@ -1,8 +1,8 @@
{
"packageDirectories": [
{
"versionName": "ver 0.6",
"versionNumber": "0.6.0.NEXT",
"versionName": "ver 0.2",
"versionNumber": "0.2.0.NEXT",
"path": "sfdx-source",
"default": true,
"package": "fflibApexExtensions",
@@ -16,10 +16,6 @@
"packageAliases": {
"fflibApexExtensions": "0HoJ8000000KyjfKAC",
"fflibApexExtensions@0.1.0-1-feature/UnlockedManagedPackage": "04tJ8000000kaKQIAY",
"fflibApexExtensions@0.1.0-2-feature/UnlockedManagedPackage": "04tJ8000000kaKVIAY",
"fflibApexExtensions@0.2.0-1-bugfix/pipelineBug": "04tJ8000000kaKaIAI",
"fflibApexExtensions@0.3.0-1-bugfix/pipelineFix2": "04tJ8000000kaKfIAI",
"fflibApexExtensions@0.4.0-1": "04tJ8000000kaKkIAI",
"fflibApexExtensions@0.5.0-1": "04tJ8000000kaKpIAI"
"fflibApexExtensions@0.1.0-2-feature/UnlockedManagedPackage": "04tJ8000000kaKVIAY"
}
}