Skip to content

Commit 0e5f6ee

Browse files
committed
fixing release workflows
1 parent 3eeeb5a commit 0e5f6ee

File tree

5 files changed

+39
-20
lines changed

5 files changed

+39
-20
lines changed

.github/workflows/create-release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ jobs:
1010

1111
runs-on: ubuntu-latest
1212

13-
permissions:
14-
contents: write
15-
1613
steps:
1714
- name: Checkout code
1815
uses: actions/checkout@v4
@@ -21,7 +18,6 @@ jobs:
2118

2219
- name: Extract version from commit message
2320
run: |
24-
# Get the version from the commit message using a regex
2521
if [[ "${{ github.event.head_commit.message }}" =~ new\ version\ ([0-9]+\.[0-9]+\.[0-9]+) ]]; then
2622
echo "version=${BASH_REMATCH[1]}" >> $GITHUB_ENV
2723
else
@@ -45,7 +41,7 @@ jobs:
4541
- name: Create GitHub release
4642
uses: actions/create-release@latest
4743
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
4945
with:
5046
tag_name: "${{ env.version }}"
5147
release_name: "${{ env.version }}"

.github/workflows/doxygen-deployment.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Doxygen Deployment
22

33
on:
4-
push:
5-
branches: [main]
6-
workflow_dispatch:
4+
release:
5+
types: [published]
76

87
jobs:
98
doxygen_generation:
@@ -15,15 +14,32 @@ jobs:
1514
steps:
1615
- name: Checkout code
1716
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
1819

1920
- name: Generate Doxygen
2021
uses: mattnotmitt/doxygen-action@edge
2122
with:
2223
doxyfile-path: ".github/Doxyfile"
2324

25+
- name: Create redirect for /latest/
26+
run: |
27+
mkdir -p redirect
28+
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=../${{ github.event.release.tag_name }}/"/></head></html>' > redirect/index.html
29+
2430
- name: Deploy Doxygen page
2531
uses: peaceiris/actions-gh-pages@v4
2632
with:
2733
github_token: ${{ secrets.GITHUB_TOKEN }}
2834
publish_branch: gh-pages
2935
publish_dir: docs/html
36+
destination_dir: ${{ github.event.release.tag_name }}
37+
keep_files: true
38+
39+
- name: Deploy redirect to /latest/
40+
uses: peaceiris/actions-gh-pages@v4
41+
with:
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
publish_branch: gh-pages
44+
publish_dir: redirect
45+
destination_dir: latest

.github/workflows/humble-docker-push.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
name: Humble Docker Push
22

33
on:
4-
push:
5-
branches: [main]
6-
workflow_dispatch:
4+
release:
5+
types: [published]
76

87
jobs:
98
humble_docker_push:
109
runs-on: ubuntu-latest
1110
steps:
1211
- name: Checkout code
1312
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
1415

1516
- name: Set up Docker Buildx
1617
uses: docker/setup-buildx-action@v3
@@ -26,4 +27,4 @@ jobs:
2627
with:
2728
build-args: ROS_DISTRO=humble
2829
push: true
29-
tags: mgons/llama_ros:humble
30+
tags: mgons/llama_ros:humble-${{ github.event.release.tag_name }}

.github/workflows/jazzy-docker-push.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
name: Jazzy Docker Push
22

33
on:
4-
push:
5-
branches: [main]
6-
workflow_dispatch:
4+
release:
5+
types: [published]
76

87
jobs:
98
jazzy_docker_push:
109
runs-on: ubuntu-latest
1110
steps:
1211
- name: Checkout code
1312
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Get tag name
17+
run: |
18+
tag_name=$(git describe --tags --abbrev=0 HEAD^)
19+
echo "tag_name=$tag_name" >> $GITHUB_ENV
1420
1521
- name: Set up Docker Buildx
1622
uses: docker/setup-buildx-action@v3
@@ -26,4 +32,4 @@ jobs:
2632
with:
2733
build-args: ROS_DISTRO=jazzy
2834
push: true
29-
tags: mgons/llama_ros:jazzy
35+
tags: mgons/llama_ros:jazzy-${{ github.event.release.tag_name }}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ This repository provides a set of ROS 2 packages to integrate [llama.cpp](https:
66

77
[![License: MIT](https://img.shields.io/badge/GitHub-MIT-informational)](https://opensource.org/license/mit) [![GitHub release](https://img.shields.io/github/release/mgonzs13/llama_ros.svg)](https://github.com/mgonzs13/llama_ros/releases) [![Code Size](https://img.shields.io/github/languages/code-size/mgonzs13/llama_ros.svg?branch=main)](https://github.com/mgonzs13/llama_ros?branch=main) [![Last Commit](https://img.shields.io/github/last-commit/mgonzs13/llama_ros.svg)](https://github.com/mgonzs13/llama_ros/commits/main) [![GitHub issues](https://img.shields.io/github/issues/mgonzs13/llama_ros)](https://github.com/mgonzs13/llama_ros/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/mgonzs13/llama_ros)](https://github.com/mgonzs13/llama_ros/pulls) [![Contributors](https://img.shields.io/github/contributors/mgonzs13/llama_ros.svg)](https://github.com/mgonzs13/llama_ros/graphs/contributors) [![Python Formatter Check](https://github.com/mgonzs13/llama_ros/actions/workflows/python-formatter.yml/badge.svg?branch=main)](https://github.com/mgonzs13/llama_ros/actions/workflows/python-formatter.yml?branch=main) [![C++ Formatter Check](https://github.com/mgonzs13/llama_ros/actions/workflows/cpp-formatter.yml/badge.svg?branch=main)](https://github.com/mgonzs13/llama_ros/actions/workflows/cpp-formatter.yml?branch=main)
88

9-
| ROS 2 Distro | Branch | Build status | Docker Image | Documentation |
10-
| :----------: | :-------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
11-
| **Humble** | [`main`](https://github.com/mgonzs13/llama_ros/tree/main) | [![Humble Build](https://github.com/mgonzs13/llama_ros/actions/workflows/humble-docker-build.yml/badge.svg?branch=main)](https://github.com/mgonzs13/llama_ros/actions/workflows/humble-docker-build.yml?branch=main) | [![Docker Image](https://img.shields.io/badge/Docker%20Image%20-humble-blue)](https://hub.docker.com/r/mgons/llama_ros/tags?name=humble) | [![Doxygen Deployment](https://github.com/mgonzs13/llama_ros/actions/workflows/doxygen-deployment.yml/badge.svg)](https://mgonzs13.github.io/llama_ros/) |
12-
| **Jazzy** | [`main`](https://github.com/mgonzs13/llama_ros/tree/main) | [![Jazzy Build](https://github.com/mgonzs13/llama_ros/actions/workflows/jazzy-docker-build.yml/badge.svg?branch=main)](https://github.com/mgonzs13/llama_ros/actions/workflows/jazzy-docker-build.yml?branch=main) | [![Docker Image](https://img.shields.io/badge/Docker%20Image%20-jazzy-blue)](https://hub.docker.com/r/mgons/llama_ros/tags?name=jazzy) | [![Doxygen Deployment](https://github.com/mgonzs13/llama_ros/actions/workflows/doxygen-deployment.yml/badge.svg)](https://mgonzs13.github.io/llama_ros/) |
9+
| ROS 2 Distro | Branch | Build status | Docker Image | Documentation |
10+
| :----------: | :-------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11+
| **Humble** | [`main`](https://github.com/mgonzs13/llama_ros/tree/main) | [![Humble Build](https://github.com/mgonzs13/llama_ros/actions/workflows/humble-docker-build.yml/badge.svg?branch=main)](https://github.com/mgonzs13/llama_ros/actions/workflows/humble-docker-build.yml?branch=main) | [![Docker Image](https://img.shields.io/badge/Docker%20Image%20-humble-blue)](https://hub.docker.com/r/mgons/llama_ros/tags?name=humble) | [![Doxygen Deployment](https://github.com/mgonzs13/llama_ros/actions/workflows/doxygen-deployment.yml/badge.svg)](https://mgonzs13.github.io/llama_ros/latest) |
12+
| **Jazzy** | [`main`](https://github.com/mgonzs13/llama_ros/tree/main) | [![Jazzy Build](https://github.com/mgonzs13/llama_ros/actions/workflows/jazzy-docker-build.yml/badge.svg?branch=main)](https://github.com/mgonzs13/llama_ros/actions/workflows/jazzy-docker-build.yml?branch=main) | [![Docker Image](https://img.shields.io/badge/Docker%20Image%20-jazzy-blue)](https://hub.docker.com/r/mgons/llama_ros/tags?name=jazzy) | [![Doxygen Deployment](https://github.com/mgonzs13/llama_ros/actions/workflows/doxygen-deployment.yml/badge.svg)](https://mgonzs13.github.io/llama_ros/latest) |
1313

1414
</div>
1515

0 commit comments

Comments
 (0)