-
Notifications
You must be signed in to change notification settings - Fork 10
60 lines (52 loc) · 1.69 KB
/
build_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
54
55
56
57
58
59
60
name: Build-Release
on:
push:
tags:
- "*"
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: Docker login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Build the Docker image
run: docker build -f Dockerfile -t ${{ secrets.DOCKERHUB_USERNAME }}/ros2pio:humble .
- name: Docker image push
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/ros2pio:humble
build-image:
runs-on: ubuntu-latest
needs: build-docker
container: fishros2/ros2pio:humble
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build firmware
run: /bin/bash release.sh
- name: Compress .pio directory
run: |
cd .pio/libdeps/featheresp32/micro_ros_platformio/
zip -r libmicroros libmicroros
- name: Generate file list for bin directory
id: file_list
run: |
file_list=$(ls -1 bin/*.bin)
echo "FILES=$file_list" >> $GITHUB_ENV
echo "REF_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref }}
name: ${{ env.REF_NAME }}
body_path: release-notes.md
token: ${{ secrets.ACCESS_TOKEN }}
draft: false
prerelease: false
files: |
${{ env.FILES }}
.pio/libdeps/featheresp32/micro_ros_platformio/libmicroros.zip