forked from thingsboard/thingsboard
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (48 loc) · 1.84 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
name: Release
on:
push:
tags:
- "v*"
env:
DOCKER_REGISTRY: ghcr.io
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Free up some disk space on the Github runner
run: du -hs /opt/hostedtoolcache; rm -rf /opt/hostedtoolcache
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{env.DOCKER_REGISTRY}}
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Parse tag
run: echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Set version from tag
working-directory: ${{github.workspace}}
run: mvn versions:set -DnewVersion=${{env.TAG_VERSION}} -DgenerateBackupPoms=false
- name: Build protobuf packages
working-directory: ${{github.workspace}}
run: ./build_proto.sh
- name: Build with Maven and push Docker images
working-directory: ${{github.workspace}}
run: mvn clean install --batch-mode --update-snapshots -Dlicense.skip -DskipTests -Ddockerfile.skip=false -Ddocker.repo=${{env.DOCKER_REGISTRY}}/${{github.repository_owner}} -Dpush-docker-image
- name: Append version to filename of thingsboard.deb
working-directory: ${{github.workspace}}/application/target/
run: mv thingsboard.deb thingsboard-${{env.TAG_VERSION}}.deb
- name: Create release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: ${{github.workspace}}/application/target/thingsboard-${{env.TAG_VERSION}}.deb