Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 9 additions & 37 deletions .github/workflows/mvn-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,12 @@ on:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: actions/cache@v2
with:
key: ${{ hashFiles('pom.xml') }}
path: ~/.m2/repository
- name: Prepare version
id: maven-version
run: |
mvn_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
git_ref=${GITHUB_REF##*/}
pr_number=${{ github.event.number }}
if [[ $git_ref =~ v[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then
if [[ v$mvn_version != $git_ref ]] ; then
echo Maven version $mvn_version does not match tag $git_ref
exit 1
fi
elif [[ $pr_number != "" && $mvn_version =~ -SNAPSHOT$ ]] ; then
pattern="s/(.+)-SNAPSHOT/\1-"$pr_number"-SNAPSHOT/g"
mvn_version=$(echo $mvn_version | sed -E $pattern)
mvn versions:set -DnewVersion=$mvn_version -DgenerateBackupPoms=false -q -DforceStdout
elif [[ ! $mvn_version =~ -SNAPSHOT$ ]] ; then
echo Refusing to publish non-snapshot version $mvn_version
echo '::set-output name=skip-publish::true'
fi
- uses: samuelmeuli/action-maven-publish@v1.4.0
if:
${{ steps.maven-version.outputs.skip-publish != 'true' }}
with:
gpg_private_key: ${{ secrets.OSSRH_GPG_KEY_ASCII }}
gpg_passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
nexus_username: ${{ secrets.OSSRH_USERNAME }}
nexus_password: ${{ secrets.OSSRH_PASSWORD }}
uses: wavesplatform/protobuf-schemas/.github/workflows/mvn-publish.yml@e7cf7fb33a89e52117ac932596a7338f1e23e82b
with:
github-ref-name: ${{ github.ref_name }}
github-event-number: ${{ github.event.number }}
secrets:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_GPG_KEY: ${{ secrets.OSSRH_GPG_KEY }}
OSSRH_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
29 changes: 6 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,14 @@ on:

jobs:
run_tests:

runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v2
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
fetch-depth: 1

- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Run tests
run: mvn -B test -Dmaven.test.failure.ignore=true

java-version: 11
distribution: temurin
cache: maven
- run: mvn -B test -Dmaven.test.failure.ignore=true
- name: Publish test report
uses: scacap/action-surefire-report@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
180 changes: 95 additions & 85 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

<groupId>com.wavesplatform</groupId>
<artifactId>waves-transactions</artifactId>
<version>1.2.5</version>
<version>1.2.6-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -43,80 +44,51 @@
</developer>
</developers>

<profiles>
<!-- Deployment profile (required so these plugins are only used when deploying) -->
<profile>
<id>deploy</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<source>8</source>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<configuration>
<!-- Prevent `gpg` from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<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.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.6.2</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.6.3</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.9.0</version>
<extensions>true</extensions>
<configuration>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.14.1</version>
<configuration>
<source>8</source>
<target>8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -126,15 +98,29 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.8</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.5.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<version>3.5.0</version>
<configuration>
<archive>
<manifest>
Expand All @@ -151,52 +137,76 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.12.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<source>11</source>
<doclint>none</doclint>
</configuration>
</execution>
</executions>
<configuration>
<source>11</source>
<doclint>none</doclint>
</configuration>
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>central-portal-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<id>central</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencies>
<!-- waves -->
<dependency>
<groupId>com.wavesplatform</groupId>
<artifactId>waves-crypto</artifactId>
<version>2.0.5</version>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>com.wavesplatform</groupId>
<artifactId>protobuf-schemas</artifactId>
<version>1.5.2</version>
<version>1.6.0</version>
</dependency>

<!-- json -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.16.1</version>
</dependency>

<!-- ethereum transaction -->
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core</artifactId>
<artifactId>crypto</artifactId>
<version>4.9.8</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
Loading