Release 1.23.1 #6
This file contains hidden or 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: release-candidate | |
| on: | |
| issues: | |
| types: [opened, reopened, edited] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| env: | |
| GIT_USER: Atsushi Watanabe | |
| GIT_EMAIL: 8390204+at-wat@users.noreply.github.com | |
| jobs: | |
| config: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.event.issue.title, 'Release ') | |
| outputs: | |
| git-user: ${{ steps.config.outputs.git-user }} | |
| git-email: ${{ steps.config.outputs.git-email }} | |
| steps: | |
| - name: Set outputs | |
| id: config | |
| run: | | |
| echo "git-user=${GIT_USER}" | tee -a ${GITHUB_OUTPUT} | |
| echo "git-email=${GIT_EMAIL}" | tee -a ${GITHUB_OUTPUT} | |
| create-release-candidate: | |
| needs: config | |
| uses: alpine-ros/alpine-ros-ci-workflows/.github/workflows/ros1-release-candidate.yaml@main | |
| with: | |
| release-title: ${{ github.event.issue.title }} | |
| branch: master | |
| git-user: ${{ needs.config.outputs.git-user }} | |
| git-email: ${{ needs.config.outputs.git-email }} | |
| pr-body: "close #${{ github.event.issue.number }}" | |
| pr-assignee: ${{ github.actor }} | |
| secrets: | |
| token: ${{ secrets.BLOOM_GITHUB_TOKEN }} | |
| update-library-version: | |
| needs: create-release-candidate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ needs.create-release-candidate.outputs.pr-branch }} | |
| - name: Setup gitconfig | |
| run: | | |
| git config --global user.name "${GIT_USER}" | |
| git config --global user.email "${GIT_EMAIL}" | |
| - name: Setup netrc | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.BLOOM_GITHUB_TOKEN }} | |
| run: | | |
| cat <<EOS >${HOME}/.netrc | |
| machine github.com | |
| login git | |
| password ${GITHUB_TOKEN} | |
| EOS | |
| - name: Update library version | |
| env: | |
| VERSION: ${{ needs.create-release-candidate.outputs.version }} | |
| run: | | |
| sed "s/^\(project(ypspur VERSION\) \S\+)\$/\1 ${VERSION})/" -i CMakeLists.txt | |
| git add CMakeLists.txt | |
| git commit -m "Update library version" | |
| - name: Push changes | |
| run: git push origin ${{ needs.create-release-candidate.outputs.pr-branch }} |