Skip to content

Commit f4fba4a

Browse files
committed
Add a workflow to build and deploy snapshots
1 parent 7de5676 commit f4fba4a

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build and deploy snapshot
2+
on:
3+
push:
4+
branches:
5+
- main
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
jobs:
9+
build:
10+
if: ${{ github.repository == 'spring-io/gradle-enterprise-conventions' }}
11+
name: Build and deploy snapshot
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up Java
15+
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
16+
with:
17+
distribution: 'liberica'
18+
java-version: 8
19+
- name: Check out code
20+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
21+
- name: Set up Gradle
22+
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
23+
- name: Configure Gradle properties
24+
shell: bash
25+
run: |
26+
mkdir -p $HOME/.gradle
27+
echo 'systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false' >> $HOME/.gradle/gradle.properties
28+
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
29+
- name: Build and publish
30+
id: build
31+
run: ./gradlew -PdistributionRepository=$(pwd)/deployment-repository build publishAllPublicationsToDistributionRepository
32+
- name: Deploy
33+
uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1
34+
with:
35+
uri: 'https://repo.spring.io'
36+
username: ${{ secrets.ARTIFACTORY_USERNAME }}
37+
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
38+
build-name: gradle-enterprise-conventions
39+
repository: 'libs-snapshot-local'
40+
folder: 'deployment-repository'
41+
signing-key: ${{ secrets.GPG_PRIVATE_KEY }}
42+
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}

0 commit comments

Comments
 (0)