Skip to content

Commit

Permalink
Fix release to Github packages (#167)
Browse files Browse the repository at this point in the history
* Fix release to Github packages
* Fix release config for klass-forvaltning
  • Loading branch information
bjornandre authored Jan 25, 2024
1 parent cb217bd commit 0feb729
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,15 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
java-version: '17'
cache: maven

# Need to downgrade Maven in order to allow HTTP (not HTTPS) packages to be downloaded.
# This is necessary as HTTP repositories were blocked in Maven 3.8.1
# HTTP repositories are used in some outdated dependenciesns
# This step can be removed once KLASS packages have been updated to more recent versions
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
with:
maven-version: 3.6.3

# Build all modules except klass-forvaltning since it is not compatible with JDK 17
- name: Publish to GitHub Packages
run: mvn --batch-mode deploy -P github
run: mvn --batch-mode deploy -pl '!:klass-forvaltning' -P github -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions klass-forvaltning/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
<relativePath /> <!-- lookup parent from repository -->
</parent>

<scm>
<developerConnection>scm:git:https://github.com/${github.repository}.git</developerConnection>
<url>https://github.com/${github.repository}</url>
<tag>HEAD</tag>
</scm>

<repositories>
<repository>
<id>vaadin-addons</id>
Expand Down Expand Up @@ -236,6 +242,16 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<releaseProfiles>documentation</releaseProfiles>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
Expand Down

0 comments on commit 0feb729

Please sign in to comment.