-
-
Notifications
You must be signed in to change notification settings - Fork 220
59 lines (57 loc) · 2.1 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
name: Release
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v2.1.3
jobs:
release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install GraphViz
run: sudo apt-get install graphviz -y
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
- name: Build Java server
run: make buildServer
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Generate checksums
run: |
cp kroki-server.jar kroki-standalone-server-${{ env.RELEASE_VERSION }}.jar
sha512sum kroki-standalone-server-${{ env.RELEASE_VERSION }}.jar > kroki-standalone-server-${{ env.RELEASE_VERSION }}.sha512sum.txt
md5sum kroki-standalone-server-${{ env.RELEASE_VERSION }}.jar > kroki-standalone-server-${{ env.RELEASE_VERSION }}.md5sum.txt
working-directory: server/target
- name: Create release
run: |
gh release create "${{ env.RELEASE_VERSION }}"
gh release upload "${{ env.RELEASE_VERSION }}" ./server/target/kroki-standalone-server-* --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_dockerhub:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install GraphViz
run: sudo apt-get install graphviz -y
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
- name: Build Java server
run: make buildServer
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
run: |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish Docker images
run: RELEASE_VERSION=${GITHUB_REF#refs/*/v*} make publishDockerImages