-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add release workflow deployment step (#109)
Signed-off-by: Masaya Kataoka <[email protected]>
- Loading branch information
1 parent
360afc5
commit 590eebb
Showing
2 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
with: | ||
name: templates | ||
path: ./workflow_templates/*.yaml | ||
deploy_build_test_workflow: | ||
deploy_workflow: | ||
needs: get_template | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
|
@@ -66,16 +66,22 @@ jobs: | |
with: | ||
repository: OUXT-Polaris/${{ matrix.package_name }} | ||
token: ${{ secrets.WAMV_TAN_BOT_SECRET }} | ||
- name: Deploy foxy workflow | ||
- name: Deploy build test workflow | ||
uses: OUXT-Polaris/[email protected] | ||
with: | ||
template: /home/runner/templates/BuildTest.yaml | ||
project_path: ./ | ||
parameters: "{ \"rosdistro\" : \"foxy,galactic\" }" | ||
- name: Deploy release workflow | ||
uses: OUXT-Polaris/[email protected] | ||
with: | ||
template: /home/runner/templates/Release.yaml | ||
project_path: ./ | ||
parameters: "{}" | ||
- name: Check branch exist | ||
id: check_branch | ||
run: | | ||
echo "::set-output name=exist::$(git ls-remote --heads https://github.com/${{ matrix.package_name }}.git workflow/scenario_test | wc -l)" | ||
echo "::set-output name=exist::$(git ls-remote --heads https://github.com/${{ matrix.package_name }}.git workflow/sync | wc -l)" | ||
- name: Count changes | ||
id: changes | ||
run: | | ||
|
@@ -90,11 +96,11 @@ jobs: | |
if: steps.check_branch.outputs.exist == 0 && steps.changes.outputs.count > 0 | ||
with: | ||
token: ${{ secrets.WAMV_TAN_BOT_SECRET }} | ||
commit-message: Setup build test workflow | ||
commit-message: Setup workflow | ||
committer: wam-v-tan <[email protected]> | ||
author: wam-v-tan <[email protected]> | ||
signoff: false | ||
branch: workflow/build_test | ||
branch: workflow/sync | ||
base: ${{ steps.check_default_branch.outputs.default_branch }} | ||
delete-branch: true | ||
title: '[Bot] Update workflow' | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'version' | ||
required: true | ||
|
||
jobs: | ||
Release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8.10' | ||
- name: install bloom | ||
run: | | ||
pip3 install bloom | ||
- name: generate changelog | ||
run: | | ||
catkin_generate_changelog --all | ||
continue-on-error: true | ||
- name: prepare git config | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "wam-v-tan" | ||
- name: prepare release | ||
run: | | ||
catkin_prepare_release --version ${{ github.event.inputs.version }} -y --no-push | ||
- name: create a GitHub release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.inputs.version }} | ||
release_name: Release ${{ github.event.inputs.version }} |