Create Release Branch (DEPRECATED) #297
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Create Release Branch | |
| on: | |
| repository_dispatch: | |
| types: [create_release_branch] | |
| schedule: | |
| - cron: '0 13 * * 1' | |
| workflow_dispatch: | |
| inputs: | |
| releaseType: | |
| description: 'Select the release type (default is minor)' | |
| required: true | |
| default: 'minor' | |
| type: choice | |
| options: | |
| - minor | |
| - major | |
| - patch | |
| - beta | |
| jobs: | |
| create_branch: | |
| name: 'Create Branch' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| release_type: ${{ github.event.inputs.releaseType || 'minor' }} | |
| branch: ${{ steps.branch.outputs.branch }} | |
| result: ${{ steps.result.outputs.result }} | |
| env: | |
| RELEASE_TYPE: ${{ github.event.inputs.releaseType || 'minor' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: 'develop' | |
| ssh-strict: false | |
| token: ${{ secrets.IDEE_GH_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ vars.NODE_VERSION || 'lts/*' }} | |
| - uses: ./.github/actions/gitConfig | |
| with: | |
| email: ${{ secrets.IDEE_GH_EMAIL }} | |
| - uses: salesforcecli/github-workflows/.github/actions/npmInstallWithRetries@main | |
| - name: Create and Push the Release Branch | |
| id: create_step | |
| run: | | |
| echo "Creating a ${{ github.event.inputs.releaseType || 'minor' }} release from branch release/v$(node -pe "require('./packages/salesforcedx-vscode/package.json').version")" | |
| node scripts/create-release-branch.js | |
| - id: result | |
| run: echo "result=${{ job.status }}" >> $GITHUB_OUTPUT | |
| - id: version | |
| run: echo "version="$(node -pe "require('./packages/salesforcedx-vscode/package.json').version")"" >> $GITHUB_OUTPUT | |
| - id: branch | |
| run: echo "branch=release/v${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT | |
| - run: echo "Release Version is ${{ steps.version.outputs.version }}" | |
| - run: echo “Release Type is ${{ github.event.inputs.releaseType || 'minor' }}” | |
| - run: echo “Release Branch is ${{ steps.branch.outputs.branch }}” | |
| trigger_generate_changelog_workflow: | |
| if: ${{ needs.create_branch.result == 'success' }} # Only run this if the previous job was successful | |
| needs: create_branch | |
| name: 'Trigger Generate Changelog Workflow' | |
| uses: ./.github/workflows/generateChangelog.yml | |
| secrets: inherit |