-
Notifications
You must be signed in to change notification settings - Fork 32
44 lines (41 loc) · 1.35 KB
/
branch-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Deploy a branch as a snapshot version.
on:
workflow_dispatch:
inputs:
run-tests:
type: boolean
description: Run tests
default: true
# Cancel previous jobs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
architecture: x64
cache: maven
server-id: ossrh
server-username: CI_DEPLOY_USERNAME
server-password: CI_DEPLOY_PASSWORD
gpg-private-key: ${{ secrets.RUNE_GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Normalize branch name
id: normalize-branch-name
uses: ./.github/actions/normalize-branch-name
- name: Set version
run: mvn -B versions:set -DgenerateBackupPoms=false -DnewVersion=0.0.0.${{ steps.normalize-branch-name.outputs.normalized }}-SNAPSHOT
- uses: ./.github/actions/maven-build
with:
build-command: deploy
run-tests: ${{ inputs.run-tests }}
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}