-
Notifications
You must be signed in to change notification settings - Fork 48
54 lines (48 loc) · 2.85 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Create a new release
on:
workflow_dispatch:
inputs:
superbuild_year_month_prefix:
description: 'The new robotology-superbuild YYYY.MM release prefix (without the "v" and the patch number, like 2021.11)'
required: true
jobs:
PrepareRelease:
name: Create the ${{ github.event.inputs.superbuild_year_month_prefix }}.0 release
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Modify the yaml file
run: |
cd releases
cp ./latest.releases.yaml ./${{ github.event.inputs.superbuild_year_month_prefix }}.0.yaml
- name: Configure Git
run: |
git config --global push.default upstream
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
- name: Commit and push the ${{ github.event.inputs.superbuild_year_month_prefix }}.0 yaml
run: |
git add .
git commit -m "Copying latest.releases.yaml to ${{ github.event.inputs.superbuild_year_month_prefix }}.0.yaml"
git push
- name: Prepare and push releases/${{ github.event.inputs.superbuild_year_month_prefix }} branch
run: |
git checkout -b releases/${{ github.event.inputs.superbuild_year_month_prefix }}
sed -i -e 's/set(ROBOTOLOGY_PROJECT_TAGS_CUSTOM_FILE/set(ROBOTOLOGY_PROJECT_TAGS_CUSTOM_FILE "\${CMAKE_CURRENT_SOURCE_DIR}\/releases\/${{ github.event.inputs.superbuild_year_month_prefix }}.0.yaml"/g' ./cmake/RobotologySuperbuildOptions.cmake
sed -i -e 's/set(ROBOTOLOGY_PROJECT_TAGS "Stable"/set(ROBOTOLOGY_PROJECT_TAGS "Custom"/g' ./cmake/RobotologySuperbuildOptions.cmake
git add .
git commit -m "Updating RobotologySuperbuildOptions.cmake"
sed -i -e 's/set(INSTALLER_VERSION "")/set(INSTALLER_VERSION ${{ github.event.inputs.superbuild_year_month_prefix }}.0)/g' ./packaging/windows/CMakeLists.txt
git add .
git commit -m "Updating packaging/windows/CMakeLists.txt"
sed -i -e 's/set(CONDA_ROBOTOLOGY_SUPERBUILD_VERSION "")/set(CONDA_ROBOTOLOGY_SUPERBUILD_VERSION ${{ github.event.inputs.superbuild_year_month_prefix }}.0)/g' ./conda/cmake/CondaGenerationOptions.cmake
git add .
git commit -m "Updating conda/cmake/CondaGenerationOptions.cmake"
git push --set-upstream origin releases/${{ github.event.inputs.superbuild_year_month_prefix }}
- name: Create and push the ${{ github.event.inputs.superbuild_year_month_prefix }}.0 tag
run: |
git checkout releases/${{ github.event.inputs.superbuild_year_month_prefix }}
git reset --hard origin/releases/${{ github.event.inputs.superbuild_year_month_prefix }}
git tag v${{ github.event.inputs.superbuild_year_month_prefix }}.0
git push --tags