-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (66 loc) · 2.12 KB
/
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Release
# Push events to matching v*, i.e. v1.0, v20.15.10
on:
push:
tags:
- 'v*'
jobs:
check:
timeout-minutes: 30
name: Check Signed Tag
runs-on: ubuntu-20.04
outputs:
stringver: ${{ steps.contentrel.outputs.stringver }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
path: src/github.com/auxon/modality-ros2
- name: Check signature
run: |
RELEASE_TAG=${{ github.ref }}
RELEASE_TAG="${RELEASE_TAG#refs/tags/}"
TAGCHECK=$(git tag -v ${RELEASE_TAG} 2>&1 >/dev/null) ||
echo "${TAGCHECK}" | grep -q "error" && {
echo "::error::tag ${RELEASE_TAG} is not a signed tag. Failing release process."
exit 1
} || {
echo "Tag ${RELEASE_TAG} is signed."
exit 0
}
working-directory: src/github.com/auxon/modality-ros2
package:
name: Package
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [check]
steps:
- name: Print version
run: |
RELEASE_TAG=${{ github.ref }}
RELEASE_TAG="${RELEASE_TAG#refs/tags/}"
RELEASE_VERSION="${RELEASE_TAG#v}"
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
echo "Release tag: $RELEASE_TAG"
echo "Release version: $RELEASE_VERSION"
- uses: actions/checkout@v3
- uses: moonrepo/setup-rust@v0
- name: Release build
run: |
./build-in-docker.sh
cp target/docker-release/libmodality_ros_hook.so libmodality_ros_hook_22.04_amd64.so
cp target/docker-release/ros_deps ros_deps_22.04_amd64
- name: Create github release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
prerelease: false
name: Release ${{ env.RELEASE_VERSION }}
files: |
libmodality_ros_hook_22.04_amd64.so
ros_deps_22.04_amd64