-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (32 loc) · 1.01 KB
/
Java-CI.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
name: "Pre-release"
on:
push:
branches:
- "main"
jobs:
pre-release:
name: "Pre-Release"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: "17"
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Build Jar file
run: mvn clean install
- name: Get commit SHA
run: echo "GITHUB_SHA_SHORT=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_ENV
- name: Release Jar file
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.GITHUB_SHA_SHORT }}"
prerelease: true
title: 'Orange Dog dev-${{ env.GITHUB_SHA_SHORT }}'