forked from liquibase/liquibase
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.38 KB
/
build-branch.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
name: Build Branch SNAPSHOT
on:
workflow_dispatch:
push:
branches:
- '**DAT-**'
env:
MAVEN_VERSION: '3.9.2'
jobs:
build:
name: Build & Package
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up Java for publishing to GitHub Repository
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: liquibase
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: ${{ env.MAVEN_VERSION }}
# Version artifact based off of branch and commit SHA.
- name: Version Artifact
run: mvn versions:set -DnewVersion="${{ github.ref_name }}-SNAPSHOT"
# This would still deploy a package if there are test failures. Might help to have build.yml complete and then run this workflow
# Publish to GitHub Packages
- name: Publish package
run: |
mvn -B clean deploy -pl '!liquibase-dist' -DskipTests=true "-Dbuild.branch=${{ github.ref_name }}" "-Dbuild.number=${{ github.run_number }}" "-Dbuild.commit=${{ github.sha }}" "-Dbuild.repository.owner=${{ github.repository_owner }}" "-Dbuild.repository.name=${{ github.repository }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}