-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (42 loc) · 1.17 KB
/
release-latest.yml
File metadata and controls
49 lines (42 loc) · 1.17 KB
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
name: Build and Release Latest
on:
push:
branches: [ develop ]
pull_request:
branches: [ master, develop ]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed full history for tags
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Package application
run: ./mvnw package -DskipTests -B
- name: Create or move latest tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -f latest
git push origin latest --force
- name: Create or update latest release
uses: softprops/action-gh-release@v2
with:
tag_name: latest
name: Latest build
body: Automated latest release, don't use this for production usage.
prerelease: true
draft: false
files: docker/*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}