swag-anapi-v2/.github/workflows/deploy-server-jar.yaml
Egor Cherniak c4173b10a4
Build upd
2022-01-24 15:40:36 +03:00

41 lines
1.3 KiB
YAML

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"'