-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.19 KB
/
work-jar.yml
File metadata and controls
43 lines (38 loc) · 1.19 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
name: Publish JAR to GitHub Pages
on:
push:
branches:
- main
jobs:
publish-jar:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Extract version from build.gradle.kts
id: extract_version
run: |
VERSION=$(./gradlew -q printVersion)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"
- name: Publish Maven artifacts to local repo
run: ./gradlew publish
env:
GROUP_ID: fr.sandro642.github
ARTIFACT_ID: ConnectorAPI
VERSION: ${{ steps.extract_version.outputs.version }}
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GH_TOKEN }}
repository-name: sandro642/sandro642.github.io
branch: main
folder: build/repo
target-folder: connectorapi/jar