-
-
Notifications
You must be signed in to change notification settings - Fork 8
139 lines (139 loc) · 6.14 KB
/
release.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Release
on:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Cache Maven repository
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up GPG
run: |
echo "$GPG_PRIVATE_KEY" > private.asc
gpg --import --batch private.asc
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Deploy
id: deploy
run: |
mvn -B -Pdeploy -Dgpg.passphrase=${GPG_PASSWORD} clean deploy
echo "::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
env:
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
MAVEN_USERNAME: jaredpetersen
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.deploy.outputs.version }}
release_name: ${{ steps.deploy.outputs.version }}
draft: false
prerelease: false
- name: Upload Release Asset -- JAR
id: upload_release_asset_jar
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/kafka-connect-arangodb-${{ steps.deploy.outputs.version }}.jar
asset_name: kafka-connect-arangodb-${{ steps.deploy.outputs.version }}.jar
asset_content_type: application/java-archive
- name: Upload Release Asset -- JAR ASC
id: upload_release_asset_jar_asc
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/kafka-connect-arangodb-${{ steps.deploy.outputs.version }}.jar.asc
asset_name: kafka-connect-arangodb-${{ steps.deploy.outputs.version }}.jar.asc
asset_content_type: text/plain
- name: Upload Release Asset -- POM
id: upload_release_asset_pom
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/kafka-connect-arangodb-${{ steps.deploy.outputs.version }}.pom
asset_name: kafka-connect-arangodb-${{ steps.deploy.outputs.version }}.pom
asset_content_type: text/xml
- name: Upload Release Asset -- POM ASC
id: upload_release_asset_pom_asc
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/kafka-connect-arangodb-${{ steps.deploy.outputs.version }}.jar.asc
asset_name: kafka-connect-arangodb-${{ steps.deploy.outputs.version }}.pom.asc
asset_content_type: text/plain
- name: Upload Release Asset -- Sources
id: upload_release_asset_sources
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/kafka-connect-arangodb-${{ steps.deploy.outputs.version }}-sources.jar
asset_name: kafka-connect-arangodb-${{ steps.deploy.outputs.version }}-sources.jar
asset_content_type: application/java-archive
- name: Upload Release Asset -- Sources ASC
id: upload_release_asset_sources_asc
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/kafka-connect-arangodb-${{ steps.deploy.outputs.version }}-sources.jar.asc
asset_name: kafka-connect-arangodb-${{ steps.deploy.outputs.version }}-sources.jar.asc
asset_content_type: text/plain
- name: Upload Release Asset -- JavaDoc
id: upload_release_asset_javadoc
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/kafka-connect-arangodb-${{ steps.deploy.outputs.version }}-javadoc.jar
asset_name: kafka-connect-arangodb-${{ steps.deploy.outputs.version }}-javadoc.jar
asset_content_type: application/java-archive
- name: Upload Release Asset -- JavaDoc ASC
id: upload_release_asset_javadoc_asc
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/kafka-connect-arangodb-${{ steps.deploy.outputs.version }}-javadoc.jar.asc
asset_name: kafka-connect-arangodb-${{ steps.deploy.outputs.version }}-javadoc.jar.asc
asset_content_type: text/plain
- name: Upload Release Asset -- Confluent Package
id: upload_release_asset_confluent_package
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/components/packages/jaredpetersen-kafka-connect-arangodb-${{ steps.deploy.outputs.version }}.zip
asset_name: jaredpetersen-kafka-connect-arangodb-${{ steps.deploy.outputs.version }}.zip
asset_content_type: application/zip