diff --git a/.github/actions/find_release_branch/action.yaml b/.github/actions/find_release_branch/action.yaml new file mode 100644 index 00000000..d5dd87c6 --- /dev/null +++ b/.github/actions/find_release_branch/action.yaml @@ -0,0 +1,42 @@ +name: 'Find Release Branch' +description: 'Find the highest v. branch in the repository.' +outputs: + branch: + description: 'The release branch name (e.g. v9.5).' + value: ${{ steps.find_branch.outputs.branch }} + +runs: + using: 'composite' + steps: + - name: Find highest release branch + id: find_branch + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + with: + script: | + const owner = context.repo.owner; + const repo = context.repo.repo; + + const branchPattern = /^v(\d+)\.(\d+)$/; + const branches = await github.paginate(github.rest.repos.listBranches, { + owner, + repo, + per_page: 100, + }); + + const versionBranches = branches + .map(b => b.name) + .filter(name => branchPattern.test(name)) + .sort((a, b) => { + const [, aMajor, aMinor] = a.match(branchPattern).map(Number); + const [, bMajor, bMinor] = b.match(branchPattern).map(Number); + return bMajor - aMajor || bMinor - aMinor; + }); + + if (versionBranches.length === 0) { + core.setFailed('No branch matching v. found.'); + return; + } + + const branch = versionBranches[0]; + core.info(`Found release branch: ${branch}`); + core.setOutput('branch', branch); diff --git a/.github/workflows/batch-merge-release-branch.yaml b/.github/workflows/batch-merge-release-branch.yaml index 190cc019..4683b3de 100644 --- a/.github/workflows/batch-merge-release-branch.yaml +++ b/.github/workflows/batch-merge-release-branch.yaml @@ -14,10 +14,6 @@ jobs: batch-merge-release-branch: runs-on: ubuntu-latest steps: - - name: Get current release branch - id: get_current_release_branch - uses: PickNikRobotics/moveit_pro/.github/actions/find_release_branch@v9.2 - - name: Checkout code uses: actions/checkout@v6 with: @@ -25,6 +21,10 @@ jobs: fetch-depth: 0 lfs: false + - name: Get current release branch + id: get_current_release_branch + uses: ./.github/actions/find_release_branch + - name: Merge release branch into main id: merge env: diff --git a/src/lab_sim/objectives/stack_blocks_with_icp.xml b/src/lab_sim/objectives/stack_blocks_with_icp.xml deleted file mode 100644 index 0804e4c4..00000000 --- a/src/lab_sim/objectives/stack_blocks_with_icp.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/lab_sim/objectives/stitch_multiple_point_clouds_together.xml b/src/lab_sim/objectives/stitch_multiple_point_clouds_together.xml index f0274748..ae393ced 100644 --- a/src/lab_sim/objectives/stitch_multiple_point_clouds_together.xml +++ b/src/lab_sim/objectives/stitch_multiple_point_clouds_together.xml @@ -18,7 +18,7 @@ @@ -30,7 +30,7 @@ @@ -42,7 +42,7 @@