Skip to content

Commit

Permalink
add release.yml, fix github actions issue where container still has o…
Browse files Browse the repository at this point in the history
…ld files
  • Loading branch information
JohnnyLiu2886 committed Nov 7, 2023
1 parent f277dc6 commit 0c245a2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
container: ros:foxy
steps:
- uses: actions/checkout@v3

- name: Clear any debian files
run: |
cd .. && rm *.deb
- run: |
sudo apt -y update
sudo apt install -y dh-make fakeroot
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release DEB package
on:
release:
types: [published]

jobs:
build-debian:
runs-on: ARM64
container: ros:foxy
steps:
- uses: actions/checkout@v3

- name: Clear any debian files
run: |
cd .. && rm *.deb
- run: |
sudo apt -y update
sudo apt install -y dh-make fakeroot
- name: fakeroot
run: fakeroot debian/rules binary

- name: Debian file
id: deb-file-name
run: |
cd .. && echo DEB_FILE="$(pwd)/$(find . -name "ros-foxy-clearbot-px4-msgs*.deb" | sed -r 's/^.{2}//')" >> "$GITHUB_OUTPUT"
- name: Upload to aptserver
env:
APTSERVER_USER: ${{ secrets.APTSERVER_USER }}
APTSERVER_PASSWORD: ${{ secrets.APTSERVER_PASSWORD }}
FILENAME: ${{ steps.deb-file-name.outputs.DEB_FILE }}
run: cd .. && curl -X POST -u $APTSERVER_USER:$APTSERVER_PASSWORD -F file=@$FILENAME https://aptserver.clearbot.dev/api/files/clearbot-px4-msgs

0 comments on commit 0c245a2

Please sign in to comment.