Skip to content

Commit

Permalink
Updated workflows; updated parent to .17
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-v committed Sep 21, 2020
1 parent 6bfc36f commit 9966947
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 101 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
name: Feature Branch CI
name: Branch CI

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

jobs:
build:
name: Feature Branch CI
name: Branch CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
64 changes: 0 additions & 64 deletions .github/workflows/master-ci.yml

This file was deleted.

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 }}
44 changes: 33 additions & 11 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ name: Release CI

on:
release:
types: [published]
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
Expand All @@ -23,16 +26,35 @@ jobs:
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Deploy release version
run: |
# `tag` is the concatenation of `v` and a version by the tag convention.
release_version=$(echo ${{ github.event.release.tag_name }} | sed "s/v//")
echo Release version $release_version
mvn versions:set -DnewVersion=$release_version -DgenerateBackupPoms=false
mvn versions:commit
mvn clean deploy -B -V
- name: Maven Build
run: mvn clean install -DskipTests=true -Ddockerfile.skip=true -B -V
env:
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
- name: Rollback release (remove tag)
- 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: git push origin :refs/tags/${{ github.event.release.tag_name }}
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
20 changes: 0 additions & 20 deletions DEVELOPMENT.md

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.scalecube</groupId>
<artifactId>scalecube-parent-pom</artifactId>
<version>0.2.1</version>
<version>0.2.17</version>
</parent>

<artifactId>scalecube-cluster-parent</artifactId>
Expand Down

0 comments on commit 9966947

Please sign in to comment.