Commit 001d1cca authored by Patrick Gotthard's avatar Patrick Gotthard
Browse files

Simplify release builds

parent 3701a167
Showing with 74 additions and 73 deletions
+74 -73
......@@ -2,20 +2,22 @@ name: CI Build
on:
push:
branches:
- '**'
tags-ignore:
- '**'
branches: ['**']
pull_request:
branches:
- master
branches: ['**']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- name: Checkout sourcecode
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 1.8
- run: mvn -B verify
\ No newline at end of file
- name: Build
run: mvn -B verify
name: Release Build
on:
push:
branches-ignore:
- '**'
tags:
- '**'
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- name: Checkout sourcecode
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- run: echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import
- run: mvn -B deploy -P release -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
- name: Import GPG key
run: echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import
- name: Build
run: mvn -B deploy scm:tag -P release -Drevision=${{ github.event.inputs.version }} -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
\ No newline at end of file
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
......@@ -6,7 +6,7 @@
<groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
<packaging>pom</packaging>
<modules>
......@@ -36,7 +36,7 @@
<scm>
<connection>scm:git:https://github.com/rometools/rome.git</connection>
<developerConnection>scm:git:ssh://git@github.com/rometools/rome.git</developerConnection>
<developerConnection>scm:git:https://github.com/rometools/rome.git</developerConnection>
<url>https://github.com/rometools/rome</url>
</scm>
......@@ -58,6 +58,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<revision>0.0.0-SNAPSHOT</revision>
</properties>
<build>
......@@ -95,7 +96,7 @@
<artifactId>maven-scm-plugin</artifactId>
<version>1.9.5</version>
<configuration>
<connectionType>developerConnection</connectionType>
<tag>${project.version}</tag>
</configuration>
</plugin>
<plugin>
......@@ -133,6 +134,31 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.7</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
......@@ -213,42 +239,42 @@
<dependency>
<groupId>com.rometools</groupId>
<artifactId>rome</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.rometools</groupId>
<artifactId>rome-certiorem</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.rometools</groupId>
<artifactId>rome-certiorem-webapp</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.rometools</groupId>
<artifactId>rome-fetcher</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.rometools</groupId>
<artifactId>rome-modules</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.rometools</groupId>
<artifactId>rome-opml</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.rometools</groupId>
<artifactId>rome-propono</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.rometools</groupId>
<artifactId>rome-utils</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
</dependency>
<!-- JDOM -->
<dependency>
......
if [%1] == [] goto :missingParameter
if [%2] == [] goto :missingParameter
set releaseVersion=%1
set nextVersion=%2
call mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=%releaseVersion% || goto :error
call mvnw scm:checkin -DpushChanges=false "-Dmessage=Update version to %releaseVersion%" || goto :error
call mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=%nextVersion% || goto :error
call mvnw scm:checkin -DpushChanges=false "-Dmessage=Update version to %nextVersion%" || goto :error
exit /b 0
:missingParameter
echo "Usage: release <releaseVersion> <nextVersion>"
exit /b 1
:error
exit /b %errorlevel%
#!/bin/bash
set -e
if [ "$#" -ne 2 ]; then
echo "Usage: release <releaseVersion> <nextVersion>"
exit 1
fi
releaseVersion=$1
nextVersion=$2
./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=$releaseVersion
./mvnw scm:checkin -DpushChanges=false "-Dmessage=Update version to $releaseVersion"
./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=$nextVersion
./mvnw scm:checkin -DpushChanges=false "-Dmessage=Update version to $nextVersion"
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -6,7 +6,7 @@
<parent>
<groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId>
<version>1.15.1-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment