Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #169 from scalecube/update-github-actions
Browse files Browse the repository at this point in the history
++github actions
  • Loading branch information
artem-v authored Sep 21, 2020
2 parents b913088 + ce19503 commit 73f5436
Show file tree
Hide file tree
Showing 36 changed files with 79 additions and 1,549 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.

12 changes: 5 additions & 7 deletions 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-gateway-parent</artifactId>
Expand Down Expand Up @@ -65,10 +65,10 @@
</scm>

<properties>
<scalecube-commons.version>1.0.10</scalecube-commons.version>
<scalecube-services.version>2.10.8</scalecube-services.version>
<scalecube-commons.version>1.0.11</scalecube-commons.version>
<scalecube-services.version>2.10.9</scalecube-services.version>
<scalecube-benchmarks.version>1.2.2</scalecube-benchmarks.version>
<scalecube-config.version>0.4.6</scalecube-config.version>
<scalecube-config.version>0.4.7</scalecube-config.version>

<reactor.version>Dysprosium-SR9</reactor.version>
<rsocket.version>1.0.1</rsocket.version>
Expand All @@ -88,11 +88,9 @@

<modules>
<module>services-gateway-netty</module>
<module>services-gateway-tests</module>
<module>services-gateway-runner</module>
<module>services-gateway-client-transport</module>
<module>services-gateway-benchmarks</module>
<module>services-gateway-examples</module>
<module>services-gateway-tests</module>
</modules>

<dependencyManagement>
Expand Down
58 changes: 0 additions & 58 deletions services-gateway-benchmarks/Dockerfile

This file was deleted.

85 changes: 0 additions & 85 deletions services-gateway-benchmarks/pom.xml

This file was deleted.

Loading

0 comments on commit 73f5436

Please sign in to comment.