Skip to content

Bump requests from 2.32.5 to 2.33.1 #6200

Bump requests from 2.32.5 to 2.33.1

Bump requests from 2.32.5 to 2.33.1 #6200

Workflow file for this run

name: Release
on:
pull_request:
branches:
- master
types:
- labeled
- opened
- reopened
- synchronize
- unlabeled
push:
branches:
- master
concurrency: release
jobs:
release:
name: Release
runs-on: ubuntu-22.04
permissions:
actions: write
checks: write
contents: write
deployments: write
issues: write
packages: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write
timeout-minutes: 10
container: ros:humble
outputs:
new_version: ${{ steps.new_version.outputs.new_version }}
steps:
# Fetch the pull request information (even if the workflow is triggered by a push event).
- uses: 8BitJonny/gh-get-current-pr@4.0.0
id: pull-request
# Currently Pull Request body is not used, but it can be useful in the future.
# Uncomment the following lines if you want to access the PR body.
#
# - name: Store PR body
# id: pull-request-body
# run: echo "pr-body=$PR" >> $GITHUB_OUTPUT
# env:
# PR: ${{ steps.pull-request.outputs.pr || '{}' }}
- name: Install catkin-pkg
run: apt update && apt install -y python3-catkin-pkg git curl
- name: Checkout
uses: actions/checkout@v6
with:
ref: master
repository: ${{ github.event.pull_request.base.repo.full_name }}
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.STRONG_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- name: Setup git
run: |
git config --global user.name "Release Bot"
git config --global user.email "action@github.com"
git config --global --add safe.directory $GITHUB_WORKSPACE
git config pull.rebase false
- name: Get old version
id: old_version
run: |
echo "old_version=$(catkin_package_version)" >> $GITHUB_OUTPUT
- name: Bump patch version
if: (contains(steps.pull-request.outputs.pr_labels, 'bump patch')) || (contains(github.event.pull_request.labels.*.name, 'bump patch'))
run: |
catkin_generate_changelog -y
catkin_tag_changelog --bump patch
catkin_package_version --bump patch
- name: Bump minor version
if: (contains(steps.pull-request.outputs.pr_labels, 'bump minor')) || (contains(github.event.pull_request.labels.*.name, 'bump minor'))
run: |
catkin_generate_changelog -y
catkin_tag_changelog --bump minor
catkin_package_version --bump minor
- name: Bump major version
if: (contains(steps.pull-request.outputs.pr_labels, 'bump major')) || (contains(github.event.pull_request.labels.*.name, 'bump major'))
run: |
catkin_generate_changelog -y
catkin_tag_changelog --bump major
catkin_package_version --bump major
- name: Get new version
id: new_version
run: |
echo "new_version=$(catkin_package_version)" >> $GITHUB_OUTPUT
- name: Commit changes
if: steps.old_version.outputs.old_version != steps.new_version.outputs.new_version
run: |
git add .
git commit -m "Bump version of scenario_simulator_v2 from version ${{ steps.old_version.outputs.old_version }} to version ${{ steps.new_version.outputs.new_version }}"
- name: Pushing to the protected branch 'master'
if: github.event_name == 'push' && steps.old_version.outputs.old_version != steps.new_version.outputs.new_version
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.STRONG_GITHUB_TOKEN }}
branch: master
force: true
- name: Get linked issues
id: linked_issues
uses: hossainemruz/linked-issues@main
with:
pr_url: ${{ github.event.pull_request.html_url }}
format: ExternalIssueRef
continue-on-error: true
- name: Update release description
env:
PULL_REQUEST_BODY: ${{ steps.pull-request.outputs.pr_body || github.event.pull_request.body }}
run: |
echo "$PULL_REQUEST_BODY" >> release_description.txt
echo "" >> release_description.txt
echo "# Related Issues " >> release_description.txt
echo "${{ steps.linked_issues.outputs.issues }}" >> release_description.txt
- name: Get release description
id: get_release_description
uses: mathiasvr/command-output@v2.0.0
with:
run: cat release_description.txt
- name: Create a GitHub release
if: github.event_name == 'push' && steps.old_version.outputs.old_version != steps.new_version.outputs.new_version
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.new_version.outputs.new_version }}
name: ${{ steps.new_version.outputs.new_version }}
body: ${{ steps.get_release_description.outputs.stdout }}