Skip to content

Commit

Permalink
Merge 4605f65 into feature/106-content-block-issue__test-106
Browse files Browse the repository at this point in the history
  • Loading branch information
cidarm authored Oct 10, 2024
2 parents b511581 + 4605f65 commit 74377aa
Show file tree
Hide file tree
Showing 52 changed files with 673 additions and 124 deletions.
File renamed without changes.
38 changes: 31 additions & 7 deletions .github/workflows/beta_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ name: beta release

on:
workflow_dispatch:

env:
CUMULUSCI_KEYCHAIN_CLASS: cumulusci.core.keychain.EnvironmentProjectKeychain
CUMULUSCI_SERVICE_github: ${{ secrets.CUMULUSCI_SERVICE_GITHUB }}
inputs:
versionName:
description: 'Name of release (e.g., Spring)'
required: true


jobs:
unit_tests:
name: "Run Beta release"
Expand Down Expand Up @@ -47,12 +49,12 @@ jobs:
id: createPackageVersion
run: |
set +e
json=$(sf package version create -p "Grants Content Kit" -x -f config/project-scratch-def.json -w 10 -b main -c --json)
json=$(sf package version create -p "Grants Content Kit" -x -f config/project-scratch-def.json -a ${{ github.event.inputs.versionName}} -w 10 -b main -c --json)
echo $json
status=$(echo $json | jq '.status')
if [ $status == "0" ]; then
packageVersionId=$(echo $json | jq -r '.result.SubscriberPackageVersionId')
echo "::set-output name=packageVersionId::$packageVersionId"
echo "packageVersionId=$packageVersionId" >> $GITHUB_OUTPUT
else
echo "sf package creation failed"
fi
Expand All @@ -70,4 +72,26 @@ jobs:
run: sf package install -p ${{ steps.createPackageVersion.outputs.packageVersionId }} -w 10 -o scratch-org -r
# Housekeeping
- name: 'Delete scratch org'
run: sf org delete scratch -p -o scratch-org
run: sf org delete scratch -p -o scratch-org

# Pull Request commit generated Package Id in sfdx-package.json file.
- name: Create Pull Request
id: create-pr
uses: peter-evans/create-pull-request@v6
with:
title: 'Bump package version to ${{ steps.createPackageVersion.outputs.packageVersionId }}'
body: |
This pull request updates the package version to ${{ steps.createPackageVersion.outputs.packageVersionId }}.
branch: 'bump-package-version-${{ steps.createPackageVersion.outputs.packageVersionId }}'
commit-message: 'chore: bump package version to ${{ steps.createPackageVersion.outputs.packageVersionId }}'
labels: 'dependencies, automated pr'
token: ${{ secrets.GITHUB_TOKEN }}

# Approve and mark PR for auto merge
- name: 'Approve and mark PR for auto merge'
run: |
gh pr review --approve "$PR_NUMBER"
gh pr merge --auto --squash --delete-branch "$PR_NUMBER"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ steps.create-pr.outputs.pull-request-number }}
57 changes: 57 additions & 0 deletions .github/workflows/production_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Promote and release Salesforce package

on:
workflow_dispatch:
inputs:
packageID:
description: 'ID (starts with 04t) of the package version to promote'
required: true
versionNumber:
description: 'Package version to release (e.g., 1.0.1 or 1.1.0)'
required: true

jobs:
promote-sf-package:
runs-on: ubuntu-latest

steps:
#Install Salesforce CLI
- name: 'Install Salesforce CLI'
run: |
npm install @salesforce/cli --location=global
nodeInstallPath=$(npm config get prefix)
echo "$nodeInstallPath/bin" >> $GITHUB_PATH
sf --version
# Checkout the source code
- name: 'Checkout source code'
uses: actions/checkout@v4

# Store secret for dev hub
- name: 'Populate auth file with DEV_HUB_URL secret'
shell: bash
run: |
echo ${{ secrets.DEV_HUB_AUTH}} > ./DEV_HUB_AUTH.txt
secretFileSize=$(wc -c "./DEV_HUB_AUTH.txt" | awk '{print $1}')
if [ $secretFileSize == 1 ]; then
echo "Missing DEV_HUB_AUTH secret. Is this workflow running on a fork?";
exit 1;
fi
# Authenticate dev hub
- name: 'Authenticate Dev Hub'
run: sf org login sfdx-url -f ./DEV_HUB_AUTH.txt -a devhub -d

# Remove auth file
- name: 'Remove auth file'
run: rm -f ./DEV_HUB_AUTH.txt

# Promote Package version
- name: Run SFDX Promote command
run: sf package version promote --package ${{ github.event.inputs.packageID }} -n

# Create release notes
- name: Create release
run: gh release create ${{ github.event.inputs.versionNumber }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.CUMULUSCI_SERVICE_GITHUB }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Create templates for your grant proposals with the Grants Content Kit!
Grants Content Kit Resources:
- [Documentation](https://github.com/Salesforce-org-Impact-Labs/GrantGuides/wiki)
- [Trailblazer Group](https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000kJbMSAU?tab=discussion&sort=LAST_MODIFIED_DATE_DESC)
- [Intallation Instructions](https://github.com/Salesforce-org-Impact-Labs/GrantGuides/wiki#get-grants-content-kit)
- [Installation Instructions](https://github.com/Salesforce-org-Impact-Labs/GrantGuides/wiki#get-grants-content-kit)

## Community Sprints

Expand Down
2 changes: 1 addition & 1 deletion config/project-scratch-def.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"orgName": "Salesforce Impact Labs",
"edition": "Developer",
"features": ["EnableSetPasswordInApi","AuthorApex", "EinsteinHawkingC2CEnabled", "EinsteinGPT"],
"features": ["EnableSetPasswordInApi","AuthorApex"],
"settings": {
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
Expand Down
1 change: 1 addition & 0 deletions cumulusci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project:
name: GrantGuides
package:
name: ggw
namespace: GCKit
api_version: '55.0'
git:
default_branch: 'main'
Expand Down
2 changes: 1 addition & 1 deletion force-app/main/default/classes/GGW_ApplicationCtrl.cls
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* GGW_ApplicationCtrl controller class support GGW.
*
*/
public without sharing class GGW_ApplicationCtrl {
public with sharing class GGW_ApplicationCtrl {
public static String ggGtSteObj = GGW_Grant_State__c.sobjecttype.getDescribe().getName();
public static String ggGtStLanField = GGW_Grant_State__c.Language__c.getDescribe().getName();
// -- START LWC CONtroller Methods
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>58.0</apiVersion>
<apiVersion>60.0</apiVersion>
<status>Active</status>
</ApexClass>
Loading

0 comments on commit 74377aa

Please sign in to comment.