Replace build configs with base-workflow

This commit is contained in:
Egor Cherniak 2022-05-30 12:06:24 +03:00
parent 4c2b256e37
commit 35117de936
No known key found for this signature in database
GPG Key ID: 26F47333B7BE4ED9
3 changed files with 18 additions and 50 deletions

View File

@ -1,28 +1,10 @@
name: Build java client
on:
- pull_request
name: Build java libraries
env:
NODEJS_VERSION: '16'
on:
pull_request:
branches:
- '*'
jobs:
bundle:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Maven
uses: actions/setup-java@v3
with:
java-version: '15'
distribution: 'adopt'
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODEJS_VERSION }}
cache: npm
- run: npm install
- name: Bundle specification
run: npm run build
- name: Build client jar
run: mvn --batch-mode clean package -f pom.xml -P="client"
build:
uses: valitydev/base-workflow/.github/workflows/maven-swag-build.yml@v1

View File

@ -1,29 +1,14 @@
name: Release java client
name: Release java libraries
on:
push:
branches: ['master', 'main', 'v2']
env:
NODEJS_VERSION: '16'
jobs:
bundle:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Maven
uses: actions/setup-java@v3
with:
java-version: '15'
distribution: 'adopt'
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODEJS_VERSION }}
cache: npm
- run: npm install
- name: Bundle specification
run: npm run build
- name: Release client jar
run: mvn --batch-mode clean install -f pom.xml -P="client"
deploy:
uses: valitydev/base-workflow/.github/workflows/maven-swag-deploy.yml@v1
secrets:
server-username: ${{ secrets.OSSRH_USERNAME }}
server-password: ${{ secrets.OSSRH_TOKEN }}
deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
github-token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -11,12 +11,13 @@
</parent>
<artifactId>swag-payments</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${revision}</version>
<packaging>jar</packaging>
<properties>
<default.package>dev.vality.swag.payments</default.package>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revision>SNAPSHOT</revision>
<swagger-annotations-version>1.5.21</swagger-annotations-version>
<jodatime-version>2.7</jodatime-version>
<maven-plugin-version>1.0.0</maven-plugin-version>