Build upd

This commit is contained in:
Egor Cherniak 2022-01-24 15:40:36 +03:00
parent 5165cd2b76
commit c4173b10a4
No known key found for this signature in database
GPG Key ID: 26F47333B7BE4ED9
4 changed files with 42 additions and 17 deletions

View File

@ -1,16 +0,0 @@
name: Maven Deploy Artifact
on:
push:
branches:
- 'master'
- 'main'
jobs:
deploy:
uses: valitydev/base-workflow/.github/workflows/maven-library-deploy.yml@v1.0.1
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 }}

View File

@ -0,0 +1,40 @@
name: Deploy Artifact
on:
push:
branches: [master]
env:
NODEJS_VERSION: '16'
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODEJS_VERSION }}
cache: npm
- run: npm install
- name: Bundle specification
run: npm run build
- name: Validate specification
run: npm run validate
- name: Retrieve commit info
run: |
echo "::set-output name=COMMIT_NUMBER::$(git rev-list HEAD --count)"
echo "::set-output name=SHA_7::${GITHUB_SHA::7}"
id: commit_info
- name: Deploy package
uses: valitydev/action-deploy-jdk-package@v1.0.12
with:
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 }}
maven-args: '-Dcommit.number=${{ steps.commit_info.outputs.COMMIT_NUMBER }} -Drevision="1.${{ steps.commit_info.outputs.COMMIT_NUMBER }}-${{ steps.commit_info.outputs.SHA_7 }}-server" -P="server"'

View File

@ -11,7 +11,7 @@
</parent>
<artifactId>swag-anapi-v2</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${revision}</version>
<packaging>jar</packaging>
<name>anapi v2</name>
@ -21,6 +21,7 @@
<properties>
<default.package>dev.vality.anapi.v2</default.package>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revision>SNAPSHOT</revision>
<maven-plugin-version>1.0.0</maven-plugin-version>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>