-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.14 KB
/
publish.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
name: Publish artifacts
on:
push:
branches:
- main
jobs:
create-release:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Determine version
id: version
run: echo version=$(./gradlew -q -Prelease :printVersion) >> $GITHUB_OUTPUT
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.version.outputs.version }}
name: Release ${{ steps.version.outputs.version }}
publish-artifacts:
runs-on: ubuntu-22.04
needs: [ create-release ]
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Publish java artifacts
uses: hypertrace/github-actions/gradle@main
with:
args: publish
env:
ORG_GRADLE_PROJECT_artifactory_contextUrl: ${{ secrets.ARTIFACTORY_CONTEXT_URL }}
ORG_GRADLE_PROJECT_artifactory_user: ${{ secrets.ARTIFACTORY_PUBLISH_USER }}
ORG_GRADLE_PROJECT_artifactory_password: ${{ secrets.ARTIFACTORY_PUBLISH_TOKEN }}