Skip to content

Commit

Permalink
add release workflow deployment step (#109)
Browse files Browse the repository at this point in the history
Signed-off-by: Masaya Kataoka <[email protected]>
  • Loading branch information
hakuturu583 authored Sep 10, 2021
1 parent 360afc5 commit 590eebb
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/deploy_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand All @@ -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'
Expand Down
39 changes: 39 additions & 0 deletions workflow_templates/Release.yaml
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 }}

0 comments on commit 590eebb

Please sign in to comment.