-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (49 loc) · 1.72 KB
/
release.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
45
46
47
48
49
50
51
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the ODPi Egeria project.
---
name: "Release"
# Trigger after code is merged. only on main repo
# - does not run on modification (may be just text)
on:
# No checks for branch or repo - assuming release creation is manual, controlled
release:
types:
- created
# Also allow for manual invocation for testing
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: "Release"
steps:
- uses: actions/checkout@v3
name: Checkout source
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- uses: gradle/wrapper-validation-action@v1
# No cache for release code
# - name: Cache Gradle packages
# uses: actions/[email protected]
# with:
# path: ~/.gradle/caches
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
# restore-keys: ${{ runner.os }}-gradle
- name: Build with Gradle & Release artifacts
# TODO: Need to extend build to make use of release repo for publishing
run: ./gradlew publish
# Import secrets needed for code signing and distribution
env:
OSSRH_GPG_KEYID: ${{ secrets.OSSRH_GPG_KEYID }}
OSSRH_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
OSSRH_GPG_PRIVATE_KEY: ${{ secrets.OSSRH_GPG_PRIVATE_KEY }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
# Upload the library so that build results can be viewed
- name: Upload Connector
uses: actions/upload-artifact@v3
with:
name: Connector
path: build/libs/*.jar