From: Debayan Sutradhar Date: Thu, 01 Apr 2021 01:41:53 +0530 Subject: Merge pull request #37 from abhinayagarwal/github-actions --- Merge pull request #37 from abhinayagarwal/github-actions Release using Github Actions --- --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Java and Maven Central + uses: actions/setup-java@v1 + with: + java-version: 11 + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + + - name: Verify project + run: mvn clean verify + + - name: Deploy snapshots + env: + MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + run: | + mvn deploy -DskipTests=true -Dgpg.skip \ No newline at end of file --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Release +on: + push: + tags: + - '*' + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Java 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Configure GIT + run: | + git config user.name "${{ github.event.head_commit.committer.name }}" + git config user.email "${{ github.event.head_commit.committer.email }}" + + - name: Release artifacts + run: | + mvn deploy -DskipTests=true -B -U -Prelease + with: + server-id: ossrh + server-username: ${{ secrets.SONATYPE_USERNAME }} + server-password: ${{ secrets.SONATYPE_PASSWORD }} + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} + + - name: Update new version + run: | + TAG=${GITHUB_REF/refs\/tags\//} + newVersion=${TAG%.*}.$((${TAG##*.} + 1)) + mvn versions:set -DnewVersion=$newVersion-SNAPSHOT -DgenerateBackupPoms=false + git commit pom.xml -m "Prepare development of $newVersion" + git push https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY} HEAD:master \ No newline at end of file --- 'a/pom.xml' +++ b/pom.xml @@ -13,25 +13,23 @@ 11 11 - 0.1.36 + 16 - 16 - - - 1.9.4 - 2.7 - - 1.0.0-SNAPSHOT - 1.0.0-SNAPSHOT - 1.0.0-SNAPSHOT - - 2.14.0 - - 11.5.0 - 11.5.0 - - com.stream_pi.server.Main + 1.0.0-SNAPSHOT + 1.0.0-SNAPSHOT + 1.0.0-SNAPSHOT + + 1.9.4 + 2.7 + + 2.14.0 + 11.5.0 + com.stream_pi.server.Main + + 2.2.1 + 3.1.0 + 1.6 @@ -39,49 +37,43 @@ org.openjfx javafx-controls - ${JavaFXVersion} + ${javafx.version} org.openjfx javafx-media - ${JavaFXVersion} + ${javafx.version} org.kordamp.ikonli ikonli-fontawesome5-pack - ${IkonliFA5PackVersion} + ${ikonli.version} org.kordamp.ikonli ikonli-javafx - ${IkonliVersion} - - - - org.openjfx - javafx-base - ${JavaFXVersion} + ${ikonli.version} com.stream-pi action-api - ${ActionAPIVersion} + ${action.api.version} com.stream-pi util - ${UtilVersion} + ${util.version} com.stream-pi theme-api - ${ThemeAPIVersion} + ${theme.api.version} @@ -89,6 +81,10 @@ + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots/ + + gluon-releases http://nexus.gluonhq.com/nexus/content/repositories/releases/ @@ -116,11 +112,10 @@ - ${MainClassName} + ${main.class.name} - com.gluonhq client-maven-plugin @@ -136,7 +131,7 @@ java.util.logging.FileHandler - ${MainClassName} + ${main.class.name} @@ -151,7 +146,6 @@ - gluon-releases @@ -163,4 +157,107 @@ + + + release + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${javadoc.plugin.version} + + + attach-javadocs + + jar + + + + + 8 + + + + org.apache.maven.plugins + maven-gpg-plugin + ${gpg.plugin.version} + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + + + + + + Stream Pi + https://www.stream-pi.com + + + + GitHub + https://github.com/Stream-Pi/client/issues + + + + + GPL-3.0 License + https://www.gnu.org/licenses/gpl-3.0.en.html + repo + + + + + + Debayan Sutradhar + debayansutradhar3@gmail.com + Stream-Pi + https://www.stream-pi.com + + + + + https://github.com/stream-pi/client + scm:git:git://github.com/stream-pi/client.git + scm:git:ssh://git@github.com:stream-pi/client.git + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + \ No newline at end of file