-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev See merge request ergo/rosen-bridge/contract!49
- Loading branch information
Showing
4 changed files
with
27 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,22 +4,21 @@ on: | |
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
release: | ||
types: [published] | ||
|
||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [2.12.7] | ||
java: [[email protected]] | ||
os: [ ubuntu-latest ] | ||
scala: [ 2.12.7 ] | ||
java: [ [email protected] ] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
|
@@ -52,9 +51,9 @@ jobs: | |
needs: tests | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [2.12.7] | ||
java: [[email protected]] | ||
os: [ ubuntu-latest ] | ||
scala: [ 2.12.7 ] | ||
java: [ [email protected] ] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
|
@@ -80,42 +79,38 @@ jobs: | |
run: | | ||
sbt ++${{ matrix.scala }} assembly | ||
- name: RUN Jar File release | ||
if: github.event_name == 'release' | ||
- name: RUN Jar File for push to master | ||
if: github.ref_type == 'branch' | ||
id: set-version | ||
run: | | ||
VERSION_STRING=$(sbt -Dsbt.supershell=false -error "print version") | ||
APP_VERSION_STRING=$(echo "${VERSION_STRING:0:5}")-$(git rev-parse --short HEAD) | ||
echo APP_VERSION=$APP_VERSION_STRING >> "$GITHUB_OUTPUT" | ||
ROSEN=$(find . -name 'contract-rosen-bridge-*.jar') | ||
java -jar $ROSEN all --version ${{ github.event.release.tag_name }} | ||
java -jar $ROSEN all --version $APP_VERSION_STRING | ||
- name: Upload JSON files | ||
uses: softprops/action-gh-release@v1 | ||
if: github.event_name == 'release' | ||
with: | ||
if: github.ref_type == 'branch' | ||
with: | ||
tag_name: ${{ steps.build-app.outputs.APP_VERSION }} | ||
prerelease: true | ||
files: | | ||
contracts-*.json | ||
tokensMap-*.json | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
- uses: dev-drprasad/[email protected] | ||
if: github.event_name != 'release' | ||
with: | ||
delete_release: true | ||
tag_name: Latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: RUN Jar File for push to master | ||
if: github.event_name != 'release' | ||
- name: RUN Jar File release | ||
if: github.ref_type == 'tag' | ||
run: | | ||
ROSEN=$(find . -name 'contract-rosen-bridge-*.jar') | ||
java -jar $ROSEN all --version Latest | ||
java -jar $ROSEN all --version ${{ github.ref_name }} | ||
- name: Upload JSON files | ||
uses: softprops/action-gh-release@v1 | ||
if: github.event_name != 'release' | ||
with: | ||
tag_name: Latest | ||
if: github.ref_type == 'tag' | ||
with: | ||
files: | | ||
contracts-*.json | ||
tokensMap-*.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters