forked from BigScary/ExtraHardMode
-
Notifications
You must be signed in to change notification settings - Fork 15
33 lines (27 loc) · 1.13 KB
/
maven-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
name: Maven Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 1.11
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }} # how come I found this on the second page of bing results in some guys blog instead of in the documentation, or am I just not looking in the right spots. https://itnext.io/getting-started-with-github-actions-fe94167dbc6d?gi=a7321180760b
asset_path: target/${{ github.event.repository.name }}.jar
asset_name: ${{ github.event.repository.name }}.jar
asset_content_type: application/java-archive
env:
GITHUB_TOKEN: ${{ github.token }}