-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (45 loc) · 1.61 KB
/
deployment.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
52
53
name: Java CD
on:
release:
types: published
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Deploy to Bintray
id: deploy-to-bintray
run: |
mvn versions:set -DnewVersion=${{ github.event.release.tag_name }}
mvn deploy -s .github/github-settings.xml || echo "deploy failed" >&2
env:
GITHUB_ACTOR: vorpal-reseacher
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_TOKEN }}
- name: Move sources jar file
run: mv target/*-sources.jar sources.jar
- name: Move target jar file
run: mv target/*[^a-zA-Z].jar target.jar
- name: Attach source jar to release
id: upload-source-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: sources.jar
asset_name: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}-sources.jar
asset_content_type: application/zip
- name: Attach target jar to release
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: target.jar
asset_name: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.jar
asset_content_type: application/zip