Skip to content

Commit 88658a9

Browse files
committed
Add GitHub Actions workflow for publishing development pre-releases
1 parent 6b83f6d commit 88658a9

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Publish Dev Pre-release
2+
run-name: ${{ github.actor }} triggered pre-release on ${{ github.ref_name }}
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
ref:
8+
description: 'Tag to run workflow on'
9+
required: true
10+
push:
11+
branches:
12+
- develop
13+
14+
jobs:
15+
prerelease:
16+
name: Build and Publish Pre-release
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Set up JDK 11
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: 'temurin'
29+
java-version: '11'
30+
cache: 'gradle'
31+
32+
- name: Cache Gradle
33+
uses: actions/cache@v4
34+
with:
35+
path: ~/.gradle/caches
36+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
37+
restore-keys: |
38+
${{ runner.os }}-gradle-
39+
40+
- name: Build project
41+
run: ./gradlew build
42+
43+
- name: Publish single pre-release
44+
uses: ncipollo/release-action@v1
45+
with:
46+
artifacts: "build/libs/*.jar"
47+
tag: dev-prerelease
48+
name: "Development Pre-release"
49+
body: |
50+
🚧 This is the latest build from the `develop` branch.
51+
Not intended for production use.
52+
prerelease: true
53+
allowUpdates: true
54+
replacesArtifacts: true

0 commit comments

Comments
 (0)