Skip to content

πŸš€ release and deploy #40

πŸš€ release and deploy

πŸš€ release and deploy #40

Workflow file for this run

name: πŸš€ release and deploy
on:
workflow_dispatch
jobs:
build:
name: release next version
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/development'
steps:
- name: checkout code
uses: actions/checkout@v3
- name: setup jdk and maven
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
cache: 'maven'
server-id: 'sonatype-nexus'
server-username: DEPLOY_USERNAME
server-password: DEPLOY_PASSWORD
# only entry that can resolve the secret directly
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: release and deploy
env:
DEPLOY_USERNAME: ${{ secrets.DEPLOY_USERNAME }}
DEPLOY_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
mkdir ~/.ssh && chmod 700 ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_ed25519
echo "${{ secrets.SSH_KEY_PUB }}" > ~/.ssh/id_ed25519.pub
chmod 400 ~/.ssh/id_ed25519*
git config user.name github-actions
git config user.email [email protected]
mvn -B release:prepare -P release
export RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
mvn -B release:perform -P release
git pull
git checkout main
git merge axon-dynamodb-${RELEASE_VERSION}
git push