Skip to content

Commit 1ab6f69

Browse files
committed
Retter deploy av tilleggsartifakter.
1 parent e147f95 commit 1ab6f69

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

.github/workflows/release-kontrakt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Publish artifacts
1919
shell: bash
2020
run: |
21-
mvn deploy -e -B --file pom.xml --settings .github/settings.xml -DtrimStackTrace=false -Dchangelist= -Dsha1= -Drevision=$NEW_VERSION -Dfile.encoding=UTF-8 -Dmaven.wagon.http.pool=false -Dtoken=${GITHUB_TOKEN}
21+
mvn deploy -e -B --file pom.xml --settings .github/settings.xml -DtrimStackTrace=false -Dchangelist= -Dsha1= -Drevision=$NEW_VERSION -Dfile.encoding=UTF-8 -Dmaven.wagon.http.pool=false -DdeployAtEnd=true -Dtoken=${GITHUB_TOKEN}
2222
env:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}
2424
NEW_VERSION: ${{ github.event.release.tag_name }}

pom.xml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -422,21 +422,29 @@
422422
</executions>
423423
</plugin>
424424
<plugin>
425-
<groupId>org.apache.maven.plugins</groupId>
426-
<artifactId>maven-deploy-plugin</artifactId>
425+
<groupId>org.codehaus.mojo</groupId>
426+
<artifactId>build-helper-maven-plugin</artifactId>
427+
<version>3.2.0</version>
427428
<executions>
428429
<execution>
429-
<phase>deploy</phase>
430+
<id>attach-artifacts</id>
431+
<phase>package</phase>
430432
<goals>
431-
<goal>deploy-file</goal>
433+
<goal>attach-artifact</goal>
432434
</goals>
433435
<configuration>
434-
<repositoryId>github</repositoryId>
435-
<!-- må matche unpacked pom.xml fra over (disse endrer ikke path ved transform p.t.) -->
436-
<pomFile>${project.build.directory}/jakarta/META-INF/maven/${project.groupId}/${project.artifactId}/pom.xml</pomFile>
437-
<url>${project.distributionManagement.repository.url}</url>
438-
<file>${project.build.directory}/${project.artifactId}-jakarta-${project.version}-TOBEDEPLOYED.jar</file>
439-
<sources>${project.build.directory}/${project.artifactId}-jakarta-${project.version}-sources-TOBEDEPLOYED.jar</sources>
436+
<artifacts>
437+
<artifact>
438+
<file>${project.build.directory}/${project.artifactId}-jakarta-${project.version}-TOBEDEPLOYED.jar</file>
439+
<type>jar</type>
440+
<classifier>jakarta</classifier>
441+
</artifact>
442+
<artifact>
443+
<file>${project.build.directory}/${project.artifactId}-jakarta-${project.version}-sources-TOBEDEPLOYED.jar</file>
444+
<type>jar</type>
445+
<classifier>jakarta-sources</classifier>
446+
</artifact>
447+
</artifacts>
440448
</configuration>
441449
</execution>
442450
</executions>

0 commit comments

Comments
 (0)