-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (30 loc) · 980 Bytes
/
Copy pathdeploy.yml
File metadata and controls
31 lines (30 loc) · 980 Bytes
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
name: Deploy
on: push
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java & Gradle
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: gradle
- name: Compute version
id: compute-version
run: |
# Get current version of project
version=$(gradle printVersion -q --console=plain)
# Save computed version
echo "Computed version: $version"
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Gradle build
run: gradle -Pversion=${{ steps.compute-version.outputs.version }} build
- name: Gradle publish
env:
PUBLISH_USERNAME: ${{ secrets.PUBLISH_USERNAME }}
PUBLISH_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }}
run: gradle -Pversion=${{ steps.compute-version.outputs.version }} publish