Create Release #33
Workflow file for this run
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
name: Create Release | |
on: | |
push: | |
tags: | |
- 'v*' # Matches tags like v1.2.3 | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: "Branch or Tag to use (e.g., v2.1.5, main)" | |
required: true | |
default: "v2.1.6-beta" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Debug output | |
run: | | |
echo "${{ inputs.ref || github.ref_name }}" | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
ref: ${{ inputs.ref || github.ref_name }} | |
- name: Install vcstool | |
run: | | |
pip install vcstool | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Import dependency and make release zip | |
run: | | |
./setup-dependency.sh | |
./manage-pkg.sh -R -v "${{ inputs.ref || github.ref_name }}" | |
- name: Create GitHub Release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: ./cabot-*.zip | |
tag: ${{ inputs.ref || github.ref_name }} | |
- name: Build docker image | |
run: | | |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
echo "skip build docker image" | |
else | |
curl -X POST \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Authorization: token ${{ secrets.CABOT_BUILD_TOKEN}}" \ | |
https://api.github.com/repos/CMU-cabot/cabot-build/dispatches \ | |
-d '{"event_type": "build-release", "client_payload":{"ref_name": "${{ github.ref_name }}"}}' | |
fi | |
env: | |
PAT: ${{ secrets.CABOT_BUILD_TOKEN }} |