RELEASE @W-16382721@: Conducting v5.0.0-alpha.1 release #9
This file contains 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-github-release | |
on: | |
pull_request: | |
branches: | |
- main-5 | |
types: | |
# There's no event type for "merged", so we just run any time a PR is closed, and exit early | |
# if the PR wasn't actually merged. | |
- closed | |
jobs: | |
create-github-release: | |
# Since the workflow runs any time a PR against main-5 is closed, we need this | |
# `if` to make sure that the workflow only does anything meaningful if the PR | |
# was actually merged. | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout main-5 | |
uses: actions/checkout@v4 | |
with: | |
ref: main-5 | |
- name: Get version property | |
id: get-version-property | |
run: | | |
PACKAGE_VERSION=$(jq -r ".version" package.json) | |
echo "package_version=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT" | |
- name: Create github release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: v${{ steps.get-version-property.outputs.package_version }} | |
name: v${{ steps.get-version-property.outputs.package_version }} | |
target_commitish: main-5 | |
body: See [release notes](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/release-notes.html) | |
token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} | |
make_latest: true |