Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
ci: move release plugins into profile (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
kayman-mk committed May 5, 2022
1 parent 5930189 commit 99c013b
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 47 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/semantic-release-dry-run.yml
Expand Up @@ -26,4 +26,8 @@ jobs:
- name: Dry run
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GH_TOKEN }}
SERVER_USERNAME: ${{ secrets.OSSRH_USERNAME }}
SERVER_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: unset GITHUB_ACTIONS && npx --prefix .release/ semantic-release --dry-run --no-ci --debug
7 changes: 3 additions & 4 deletions .releaserc.yml
Expand Up @@ -55,11 +55,8 @@ generateNotes:
- path: "@semantic-release/release-notes-generator"
writerOpts:
groupBy: "type"
commitGroupsSort:
- "feat"
- "perf"
- "fix"
commitsSort: "header"
commitGroupsSort: 'title'
linkCompare: true
linkReferences: true
types:
Expand Down Expand Up @@ -105,6 +102,8 @@ prepare:

publish:
- path: "semantic-release-maven"
profiles:
- release
- path: "@semantic-release/github"
assets:
- path: "CHANGELOG.md"
Expand Down
98 changes: 55 additions & 43 deletions pom.xml
Expand Up @@ -43,82 +43,94 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<profiles>
<profile>
<id>release</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<sourceDirectory>src/java/main</sourceDirectory>

<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.9.10</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
<execution>
<id>validate-the-git-infos</id>
<id>attach-sources</id>
<goals>
<goal>validateRevision</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
<configuration>
<failOnNoGitDirectory>true</failOnNoGitDirectory>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<id>attach-javadocs</id>
<goals>
<goal>sign</goal>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.9.10</version>
<executions>
<execution>
<id>attach-sources</id>
<id>get-the-git-infos</id>
<goals>
<goal>jar-no-fork</goal>
<goal>revision</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<id>validate-the-git-infos</id>
<goals>
<goal>jar</goal>
<goal>validateRevision</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<failOnNoGitDirectory>true</failOnNoGitDirectory>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 99c013b

Please sign in to comment.