Skip to content

Commit

Permalink
Merge pull request #167 from scalecube/github-actions
Browse files Browse the repository at this point in the history
Updated parent pom + workflows; removed travis support
  • Loading branch information
artem-v authored Sep 21, 2020
2 parents 3100e49 + 2b3a616 commit a543bae
Show file tree
Hide file tree
Showing 11 changed files with 207 additions and 117 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Auto detect text files and perform LF normalization
* text=auto
*.txt text
*.sh text eol=lf
*.html text eol=lf diff=html
*.css text eol=lf
*.js text eol=lf
*.jpg -text
*.pdf -text
*.java text diff=java
36 changes: 36 additions & 0 deletions .github/workflows/branch-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Branch CI

on:
push:
paths-ignore:
- '.github/workflows/**'
- '*.md'
- '*.txt'
branches-ignore:
- 'release*'

jobs:
build:
name: Branch CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Maven Build
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -Ddockerfile.skip=true -B -V
env:
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
- name: Maven Verify
run: mvn verify -B
37 changes: 37 additions & 0 deletions .github/workflows/pre-release-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Pre-release CI

on:
release:
types: [prereleased]

jobs:
build:
name: Pre-release CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Deploy pre-release version
run: |
pre_release_version=${{ github.event.release.tag_name }}
echo Pre-release version $pre_release_version
mvn versions:set -DnewVersion=$pre_release_version -DgenerateBackupPoms=false
mvn versions:commit
mvn clean deploy -B -V
env:
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
- name: Rollback pre-release (remove tag)
if: failure()
run: git push origin :refs/tags/${{ github.event.release.tag_name }}
60 changes: 60 additions & 0 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release CI

on:
release:
types: [released]

jobs:
build:
name: Release CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: git checkout ${{ github.event.release.target_commitish }}
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Maven Build
run: mvn clean install -DskipTests=true -Ddockerfile.skip=true -B -V
env:
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
- name: Maven Verify
run: mvn verify -B
- name: Configure git
run: |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
- name: Prepare release
id: prepare_release
run: |
mvn -B build-helper:parse-version release:prepare \
-DreleaseVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion} \
-Darguments="-DskipTests=true -Ddockerfile.skip=true"
echo ::set-output name=release_tag::$(git describe --tags --abbrev=0)
- name: Perform release
run: mvn -B release:perform -Darguments="-DskipTests=true -Ddockerfile.skip=true"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
- name: Rollback release
if: failure()
run: |
mvn release:rollback || echo "nothing to rollback"
git push origin :refs/tags/${{ github.event.release.tag_name }}
if [ ! -z "${{ steps.prepare_release.outputs.release_tag }}" ]
then
git tag -d ${{ steps.prepare_release.outputs.release_tag }}
git push origin :refs/tags/${{ steps.prepare_release.outputs.release_tag }}
fi
41 changes: 10 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,13 @@
# Eclipse project files
.project
.classpath
.settings

# IntelliJ IDEA project files and directories
.*
!.gitignore
!.gitattributes
!.github
!.editorconfig
!.*.yml
!.env.example
**/target/
*.iml
*.ipr
*.iws
.idea/

# Geany project file
.geany

# KDevelop project file and directory
.kdev4/
*.kdev4

# Build targets
/target
*/target

# Report directories
/reports
*/reports
**/logs/*.log
*.db
*.csv
*.log
*.zip

# Mac-specific directory that no other operating system needs.
.DS_Store

# JVM crash logs
hs_err_pid*.log
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends: default
rules:
document-start:
present: false
truthy: disable
comments:
min-spaces-from-content: 1
line-length:
max: 150
braces:
min-spaces-inside: 0
max-spaces-inside: 0
brackets:
min-spaces-inside: 0
max-spaces-inside: 0
indentation:
indent-sequences: consistent
6 changes: 3 additions & 3 deletions LICENSE → LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -178,15 +179,15 @@
APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -199,4 +200,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

31 changes: 25 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.scalecube</groupId>
<artifactId>scalecube-parent-pom</artifactId>
<version>0.0.19</version>
<version>0.2.17</version>
</parent>


<artifactId>reactor-aeron-parent</artifactId>
<version>0.1.5-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ScaleCube/ReactorAeron</name>

<repositories>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/scalecube/packages</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<name>ScaleCube/scalecube-reactor-aeron</name>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/scalecube/reactor-aeron</url>
</repository>
</distributionManagement>

<scm>
<url>https://github.com/scalecube/scalecube</url>
<connection>scm:git:git@github.com:scalecube/reactor-aeron.git</connection>
<developerConnection>scm:git:git@github.com:scalecube/reactor-aeron.git
<connection>scm:git:https://github.com/scalecube/reactor-aeron.git</connection>
<developerConnection>scm:git:https://github.com/scalecube/reactor-aeron.git
</developerConnection>
<tag>HEAD</tag>
</scm>
Expand Down
55 changes: 0 additions & 55 deletions travis-settings.xml

This file was deleted.

0 comments on commit a543bae

Please sign in to comment.