-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.65 KB
/
deploy.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
name: Create release on version tag and publish core package
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
if: github.repository == 'BioDWH2/BioDWH2-GraphQL-Server' # Only run on main repository and not forks
steps:
- name: Retrieve tag name
id: tag_name
uses: little-core-labs/[email protected]
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag_name.outputs.tag }}
release_name: Release ${{ steps.tag_name.outputs.tag }}
draft: false
prerelease: false
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
env:
USENAME: ${{ github.actor }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: mvn package -DskipTests --file src/pom.xml --settings src/settings.xml
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./src/target/BioDWH2-GraphQL-Server-${{ steps.tag_name.outputs.tag }}.jar
asset_name: BioDWH2-GraphQL-Server-${{ steps.tag_name.outputs.tag }}.jar
asset_content_type: application/java-archive