Skip to content

Commit 49cbf21

Browse files
SundermannCCopilotCopilot
authored
chore: Update Java maven release and conventional commits version (#74)
* Updates Java maven deploy to react to releases and only to releases Replace webiny/action-conventional-commits (checks all PR commit messages) with amannn/action-semantic-pull-request (checks PR title), which validates the Conventional Commits format on the squash-merge entry point instead of each individual commit. * chore: follow yaml styling conventions Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Chore: updates version to 0.5.1 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent ae5060f commit 49cbf21

4 files changed

Lines changed: 9 additions & 34 deletions

File tree

.github/workflows/conventionalpr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Conventional Commit Parser
22
on:
33
pull_request:
44
branches: [main, master, develop]
5-
types: [opened, reopened, edited, review_requested, synchronize]
5+
types: [opened, reopened, edited, synchronize]
66

77
jobs:
88
conventional_commit:
@@ -11,6 +11,6 @@ jobs:
1111
permissions:
1212
pull-requests: read
1313
steps:
14-
- uses: webiny/action-conventional-commits@v1.3.0
15-
with:
14+
- uses: amannn/action-semantic-pull-request@v6.1.1
15+
env:
1616
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/java.yml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: Build and Deploy Java Parser
22

33
on:
4-
push:
5-
branches: [develop, main]
6-
tags: ['v*']
7-
4+
release:
5+
types: [published]
6+
87
jobs:
98
build:
109
runs-on: ubuntu-latest
@@ -41,27 +40,12 @@ jobs:
4140
- name: Install ANTLR4
4241
run: make dev
4342

44-
- name: Set SNAPSHOT version (develop branch)
45-
if: github.ref == 'refs/heads/develop'
46-
run: |
47-
cd java
48-
BASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//')
49-
mvn versions:set -DnewVersion="${BASE_VERSION}-SNAPSHOT" -DgenerateBackupPoms=false
50-
51-
- name: Set release version (main branch)
52-
if: github.ref == 'refs/heads/main'
43+
- name: Set release version
5344
run: |
5445
cd java
5546
BASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//')
5647
mvn versions:set -DnewVersion="${BASE_VERSION}" -DgenerateBackupPoms=false
5748
58-
- name: Set release version (tag)
59-
if: startsWith(github.ref, 'refs/tags/v')
60-
run: |
61-
cd java
62-
TAG_VERSION=${GITHUB_REF_NAME#v}
63-
mvn versions:set -DnewVersion="${TAG_VERSION}" -DgenerateBackupPoms=false
64-
6549
- name: Generate and Compile Java Code
6650
run: make java_parser
6751

@@ -72,16 +56,7 @@ jobs:
7256
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
7357
restore-keys: ${{ runner.os }}-m2
7458

75-
- name: Deploy SNAPSHOT to Sonatype Snapshots
76-
if: github.ref == 'refs/heads/develop'
77-
run: cd java && mvn clean deploy -DskipCentralPublishing=true
78-
env:
79-
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
80-
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
81-
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
82-
8359
- name: Deploy Release to Central Portal
84-
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
8560
run: cd java && mvn clean deploy
8661
env:
8762
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ To use UVL in your projects, you can either:
3434
<dependency>
3535
<groupId>io.github.universal-variability-language</groupId>
3636
<artifactId>uvl-parser</artifactId>
37-
<version>0.3</version>
37+
<version>0.5.1</version>
3838
</dependency>
3939
```
4040
### Python Parser

java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<groupId>io.github.universal-variability-language</groupId>
1313
<artifactId>uvl-parser</artifactId>
14-
<version>0.5.0</version>
14+
<version>0.5.1</version>
1515

1616
<licenses>
1717
<license>

0 commit comments

Comments
 (0)