diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index e9f2d6bf..a9802d2d 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -16,6 +16,12 @@ jobs: contents: write pull-requests: write steps: + - name: Authenticate as semgrep-ide-plugins-release + id: generate-token + uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0 + with: + app-id: ${{ vars.SEMGREP_IDE_PLUGINS_RELEASE_APP_ID }} + private-key: ${{ secrets.SEMGREP_IDE_PLUGINS_RELEASE_PRIVATE_KEY }} - uses: actions/checkout@v4 - uses: actions/setup-node@v4.0.3 with: @@ -25,43 +31,14 @@ jobs: SEMGREP_STATIC_VERSION: "release-${{ inputs.version }}" run: | echo "${SEMGREP_STATIC_VERSION}" > semgrep-version - - name: Commit and push - id: commit - env: - NEW_SEMGREP_VERSION: "${{ github.event.inputs.version }}" - GITHUB_ACTOR: "${{ github.actor }}" - GITHUB_RUN_ID: "${{ github.run_id }}" - GITHUB_RUN_ATTEMPT: "${{ github.run_attempt }}" - run: | - git config user.name "${GITHUB_ACTOR}" - git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - BRANCH="gha/bump-version-${NEW_SEMGREP_VERSION}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" - SUBJECT="Bump semgrep to ${NEW_SEMGREP_VERSION}" - git checkout -b "${BRANCH}" - git add . - git commit -m "${SUBJECT}" - git push --set-upstream origin "${BRANCH}" - echo "branch=${BRANCH}" >> "${GITHUB_OUTPUT}" - echo "subject=${SUBJECT}" >> "${GITHUB_OUTPUT}" - - name: bump package patch version - run: | - npm version patch - git push - - name: Create PR - id: open-pr - env: - SOURCE: "${{ steps.commit.outputs.branch }}" - TARGET: "${{ github.event.repository.default_branch }}" - TITLE: "chore: Release Version ${{ inputs.version }}" - VERSION: "${{ inputs.version }}" - GH_TOKEN: "${{ github.token }}" - run: | - # check if the branch already has a pull request open - if gh pr list --head "${SOURCE}" | grep -vq "no pull requests"; then - # pull request already open - echo "pull request from SOURCE ${SOURCE} to TARGET ${TARGET} is already open"; - echo "cancelling release" - exit 1 - fi - # open new pull request with the body of from the local template. - gh pr create --title "${TITLE}" --body "Bump Semgrep Version to ${VERSION}" --base "${TARGET}" --head "${SOURCE}" + - name: Bump package patch version + run: npm version patch --no-git-tag-version + - name: Create pull request + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 + with: + token: ${{ steps.generate-token.outputs.token }} + sign-commits: true + branch: gha/bump-version-${{ inputs.version }}-${{ github.run_id }}-${{ github.run_attempt }} + commit-message: "Bump semgrep to ${{ inputs.version }}" + title: "chore: Release Version ${{ inputs.version }}" + body: "Bump Semgrep Version to ${{ inputs.version }}" diff --git a/package-lock.json b/package-lock.json index af37e723..6ef07328 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "semgrep", - "version": "1.17.0", + "version": "1.17.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "semgrep", - "version": "1.17.0", + "version": "1.17.1", "dependencies": { "@opentelemetry/api": "^1.9.0", "@opentelemetry/auto-instrumentations-node": "^0.60.1", diff --git a/package.json b/package.json index 48ae8da8..f97d6494 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "semgrep", "displayName": "Semgrep", "description": "Security scans in a snap. Speedy SAST with a powerful rule registry for seamless detection and remediation of code vulnerabilities with each save.", - "version": "1.17.0", + "version": "1.17.1", "engines": { "vscode": "^1.86.0" }, diff --git a/semgrep-version b/semgrep-version index 35d81088..346b1837 100644 --- a/semgrep-version +++ b/semgrep-version @@ -1 +1 @@ -release-1.159.0 +release-1.161.0