Skip to content

RELEASE @W-16608399@: Conducting v1.2.0 release #11

RELEASE @W-16608399@: Conducting v1.2.0 release

RELEASE @W-16608399@: Conducting v1.2.0 release #11

name: create-github-release
on:
pull_request:
branches:
- main
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:
verify-should-run:
# Since the workflow runs any time a PR against main 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
steps:
- run: echo 'PR was merged, so running is fine'
# We need a VSIX to attach to the release.
create-vsix-artifact:
name: 'Upload VSIX as artifact'
needs: verify-should-run
uses: ./.github/workflows/create-vsix-artifact.yml
create-github-release:
runs-on: ubuntu-latest
needs: create-vsix-artifact
permissions:
contents: write
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main
- name: Get version property
id: get-version-property
run: |
PACKAGE_VERSION=$(jq -r ".version" package.json)
echo "package_version=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
- name: Download VSIX artifact
id: download
uses: actions/download-artifact@v4
with:
name: vsix
# Create the release
- 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 }}
body: See [release notes](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/release-notes.html)
target_commitish: main
token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
make_latest: true
# Attach the unzipped VSIX using a glob
files: |
*.vsix