Skip to content

Commit

Permalink
Merge pull request #105 from Bernardo-MG/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
Bernardo-MG authored Jun 3, 2021
2 parents c972946 + ad0b073 commit cf03a92
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 84 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/deploy.yml

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ jobs:
- name: Check-out
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2.1.0
with:
java-version: 11
distribution: 'adopt'
- name: Set up Maven settings
uses: bernardo-mg/[email protected]
with:
version-type: ${{ steps.extract_branch.outputs.branch }}
env:
DEPLOY_DOCS_USER: ${{ secrets.DEPLOY_DOCS_USER }}
DEPLOY_DOCS_PASSWORD: ${{ secrets.DEPLOY_DOCS_PASSWORD }}
Expand All @@ -40,7 +39,7 @@ jobs:
DEPLOY_DOCS_DEVELOP_SITE: ${{ secrets.DEPLOY_DOCS_DEVELOP_SITE }}
- name: Deploy development docs
if: steps.extract_branch.outputs.branch == 'develop'
run: mvn site site:deploy -B -P deployment,deployment-development --settings settings.xml
run: mvn verify site site:deploy -B -P deployment,deployment-development --settings settings.xml
- name: Deploy release docs
if: steps.extract_branch.outputs.branch == 'master'
run: mvn site site:deploy -B -P deployment,deployment-release --settings settings.xml
run: mvn verify site site:deploy -B -P deployment,deployment-release --settings settings.xml
27 changes: 27 additions & 0 deletions .github/workflows/deploy_github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Github Repository Deployment

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Check-out
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: 11
distribution: 'adopt'
server-id: github
- name: Deploy
run: mvn deploy -B -P deployment,deployment-release,deployment-github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/deploy_ossrh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: OSSRH Repository Deployment

on:
release:
types: [created]

jobs:
deploy:

environment: deployment_ossrh
runs-on: ubuntu-latest

steps:
- name: Check-out
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: 11
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Deploy
run: mvn deploy -B -P deployment,deployment-release,deployment-ossrh
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3 changes: 2 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ jobs:
- name: Check-out
uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v1
uses: actions/setup-java@v2.1.0
with:
java-version: ${{ matrix.jdk }}
distribution: 'adopt'
- name: Run all tests
run: mvn clean verify
88 changes: 64 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.bernardomg.maven</groupId>
<artifactId>base-pom</artifactId>
<version>1.4.0</version>
<version>1.4.2</version>
</parent>

<!-- ********************************************** -->
Expand All @@ -20,7 +20,7 @@

<groupId>com.bernardomg.tabletop</groupId>
<artifactId>dice</artifactId>
<version>2.1.1</version>
<version>2.1.2</version>
<packaging>jar</packaging>

<name>Dice Notation Tools for Java</name>
Expand Down Expand Up @@ -58,21 +58,6 @@
<notifiers />
</ciManagement>

<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>releases</id>
<name>Releases Repository</name>
<url>https://api.bintray.com/maven/bernardo-mg/tabletop-toolkits/dice</url>
</repository>
<snapshotRepository>
<uniqueVersion>false</uniqueVersion>
<id>snapshots</id>
<name>Snapshots Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>

<!-- ********************************************** -->
<!-- ****************** PROFILES ****************** -->
<!-- ********************************************** -->
Expand Down Expand Up @@ -174,6 +159,61 @@
<maven.test.skip>true</maven.test.skip>
</properties>
</profile>
<profile>
<!-- Github deployment profile. -->
<id>deployment-github</id>
<distributionManagement>
<repository>
<!-- Github repository -->
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/Bernardo-MG/dice-notation-java</url>
</repository>
</distributionManagement>
</profile>
<profile>
<!-- OSSRH deployment profile. -->
<id>deployment-ossrh</id>
<distributionManagement>
<repository>
<!-- OSSRH repository -->
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<!-- OSSRH snapshots repository -->
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<!-- GPG -->
<!-- Signs the artifacts -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- Prevent gpg from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<!-- ********************************************** -->
Expand Down Expand Up @@ -217,11 +257,11 @@
<!-- ============================================== -->
<!-- =========== DEPENDENCIES VERSIONS ============ -->
<!-- ============================================== -->
<antlr.version>4.9.1</antlr.version>
<guava.version>30.1-jre</guava.version>
<junit.jupiter.version>5.7.1</junit.jupiter.version>
<mockito.version>3.7.7</mockito.version>
<log4j.version>2.14.0</log4j.version>
<antlr.version>4.9.2</antlr.version>
<guava.version>30.1.1-jre</guava.version>
<junit.jupiter.version>5.7.2</junit.jupiter.version>
<mockito.version>3.11.0</mockito.version>
<log4j.version>2.14.1</log4j.version>
<slf4j.version>1.7.30</slf4j.version>
<!-- ============================================== -->
<!-- ============== PLUGINS VERSIONS ============== -->
Expand All @@ -232,9 +272,9 @@
<!-- ============================================== -->
<!-- ================= MAVEN SITE ================= -->
<!-- ============================================== -->
<site.skin.version>2.0.11</site.skin.version>
<bintrayURL>https://bintray.com/bernardo-mg/tabletop-toolkits/dice/view</bintrayURL>
<site.skin.version>2.2.0</site.skin.version>
<mavenURL>http://mvnrepository.com/artifact/com.bernardomg.tabletop/dice</mavenURL>
<githubArtifactURL><![CDATA[https://github.com/Bernardo-MG?tab=packages&amp;repo_name=dice-notation-java]]></githubArtifactURL>
</properties>

<!-- ********************************************** -->
Expand Down
6 changes: 2 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ With the pass of years it has evolved, and while it never underwent a formal sta
Its usefulness is very clear, it allows working with specific random values distributions. And while this is no feat for a machine, which has better tools for it, the aim of the project is not actually handling those distributions, but giving a way for applications to work with the same tools a board game would have.

[![Maven Central](https://img.shields.io/maven-central/v/com.bernardomg.tabletop/dice.svg)][maven-repo]
[![Bintray](https://api.bintray.com/packages/bernardo-mg/tabletop-toolkits/dice/images/download.svg)][bintray-repo]

[![Release docs](https://img.shields.io/badge/docs-release-blue.svg)][site-release]
[![Development docs](https://img.shields.io/badge/docs-develop-blue.svg)][site-develop]
Expand Down Expand Up @@ -68,9 +67,9 @@ JDK 8 or higher is required. All other dependencies are handled through Maven, a

### Installing

The recommended way to install the project is by setting up your preferred dependencies manager. To get the configuration information for this check the [Bintray repository][bintray-repo], or the [Maven Central Repository][maven-repo].
The recommended way to install the project is by setting it up as a dependency. To get the configuration information for this check the [Maven Central Repository][maven-repo].

If for some reason manual installation is necessary, just use the following Maven command:
It is always possible installing it by using the usual Maven command:

```
mvn install
Expand Down Expand Up @@ -118,7 +117,6 @@ If you wish to fork or modify the code, visit the [GitHub project page][scm], wh
The project has been released under version 2.0 of the [Apache License][license].

[antrl-grammars]: https://github.com/antlr/grammars-v4
[bintray-repo]: https://bintray.com/bernardo-mg/tabletop-toolkits/dice/view
[maven-repo]: http://mvnrepository.com/artifact/com.bernardomg.tabletop/dice
[issues]: https://github.com/Bernardo-MG/dice-notation-java/issues
[javadoc-develop]: https://docs.bernardomg.com/development/maven/dice-notation-java/apidocs
Expand Down
5 changes: 5 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,10 @@
Updated CI configuration.
</action>
</release>
<release version="2.1.2" date="2021-06-03" description="Deployment updates">
<action dev="bmg" type="update">
Updated CI deployment configuration.
</action>
</release>
</body>
</document>
25 changes: 3 additions & 22 deletions src/site/markdown/acquire.md.vm
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
#set( $symbol_pound = '#' )
${symbol_pound} Setting up the dependencies

The project files are hosted on a [Bintray repository][bintray-repo], and have been replicated on JCenter and OSS Sonatype, which also replicates into the [Maven Central Repository][maven-repo].

This means that most Maven setups will be able to acquire the dependency without any additional configuration. Still, if the repository should be registered it is recommended using the Bintray one.
The project files are hosted in the the [Maven Central Repository][maven-repo], and the [Github Packages Repository][github-repo]. This means that most Maven setups will be able to acquire the dependency without any additional configuration.

For any additional information about how to set up the dependency check the [dependency information section](./dependency-info.html).

${symbol_pound}${symbol_pound} Snapshots

Snapshot artifacts are stored on OSS Sonatype. They can be accessed by adding the following lines to the configuration files:

${symbol_pound}${symbol_pound}${symbol_pound} Maven

```xml
<repositories>
...
<repository>
<id>oss-sonatype-snapshots</id>
<name>OSS Sonatype snapshots repository</name>
<url>https://oss.sonatype.org/content/groups/staging</url>
</repository>
...
</repositories>
```

[bintray-repo]: ${bintrayURL}
[maven-repo]: ${mavenURL}
[maven-repo]: ${mavenURL}
[github-repo]: ${githubArtifactURL}
4 changes: 2 additions & 2 deletions src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
</item>
</menu>
<menu name="Releases" inherit="bottom">
<item name="Bintray" href="${bintrayURL}" />
<item name="Maven Central" href="${mavenURL}" />
<item name="Github" href="${githubArtifactURL}" />
</menu>
<menu name="Icons" inherit="bottom">
<item name="Github" img="github" href="${project.scm.url}" />
<item name="Github" img="fab fa-github" href="${project.scm.url}" />
</menu>
</body>

Expand Down

0 comments on commit cf03a92

Please sign in to comment.