Skip to content

Commit

Permalink
Enable branch-specific build
Browse files Browse the repository at this point in the history
  • Loading branch information
kkorotkov committed Dec 11, 2023
1 parent 1f06ce0 commit 06c1064
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/netlicensing-client-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ jobs:
clean deploy scm:tag \
-P release \
-Drevision=${{ github.event.inputs.release-version }} \
-Dchangelist= \
-Dmessage="Release ${{ github.event.inputs.release-version }}" \
-Dgpg.passphrase=${{ secrets.GPG_KEY_PASS }}
21 changes: 20 additions & 1 deletion .github/workflows/netlicesning-client-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,33 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: 'adopt'
cache: maven

- name: Prepare maven settings.xml
run: |
mkdir -p ~/.m2
cat << EOF >~/.m2/settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>nlic-snapshots</id>
<username>${{ secrets.SNAPSHOTS_USER }}</username>
<password>${{ secrets.SNAPSHOTS_PASS }}</password>
</server>
</servers>
</settings>
EOF
- name: Build with Maven
run: mvn -B clean verify
run: mvn -B clean install -Drepo.snapshots.url=${{ secrets.SNAPSHOTS_URL }} -Dsha1=${{ github.ref_name }}

- name: Run Demo App
run: |
ls -la NetLicensingClient-demo/target/
Expand Down
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.labs64.netlicensing</groupId>
<artifactId>netlicensing-client-parent</artifactId>
<version>${revision}</version>
<version>${revision}${sha1}${changelist}</version>
<packaging>pom</packaging>
<name>Labs64 :: NetLicensing :: Client :: Parent</name>
<url>https://netlicensing.io</url>
Expand Down Expand Up @@ -63,7 +63,9 @@
</modules>

<properties>
<revision>2.10.0-SNAPSHOT</revision>
<revision>2.10.0</revision>
<changelist>-SNAPSHOT</changelist>
<sha1/>
<project.title>${project.name}</project.title>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

Expand Down

0 comments on commit 06c1064

Please sign in to comment.