Skip to content

Release 3.1.0

Release 3.1.0 #28

name: Release - Package Version Creation
on:
pull_request:
branches:
- 'main'
paths:
- 'force-app/main/default/**'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
PBO_AUTH_URL: ${{ secrets.PBO_AUTH_URL }}
steps:
- name: Checkout This Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install yq
run: sudo snap install yq
- name: Make scripts executable
run: |
chmod +x scripts/update-app-info-version.sh
chmod +x scripts/create-new-package-version.sh
- name: Verify And Update App Version
run: scripts/update-app-info-version.sh
- name: Install Salesforce CLI
run: npm install @salesforce/cli --global
- name: Create authentication file from secret
run: echo ${PBO_AUTH_URL} > secret.json
- name: Authenticate to Dev Hub
run: sf org login sfdx-url -f secret.json --set-default-dev-hub
- name: Create Package Version
env:
MAX_ATTEMPTS: ${{ vars.MAX_ATTEMPTS }}
run: scripts/create-new-package-version.sh
- name: Commit Modified Files
run: |
git status
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git config pull.rebase true
git add force-app/main/default/classes/AdyenOMSConstants.cls sfdx-project.json
# Check if any of the files have been modified before committing
if git diff --cached --quiet; then
echo "No changes detected. Skipping commit."
else
echo "Changes detected. Committing changes."
git commit -m "Updating versions on sfdx-project.json and AdyenOMSConstants.cls if needed"
git pull origin "${{ github.head_ref }}"
git push origin "HEAD:${{ github.head_ref }}"
fi