forked from nick-less/FritzTR064
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.77 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
52
53
54
55
name: Release/Maven Deploy
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github
settings-path: ${{ github.workspace }}
- name: Set version
run: mvn versions:set -DnewVersion=0.2.0-b${{ github.run_number }}
- name: Build with Maven
run: mvn -B package
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: '0.2.0-b${{ github.run_number }}'
release_name: Release 0.2.0-b${{ github.run_number }}
body: |
Changes in this Release
- ...
draft: false
prerelease: true
- 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: ./target/fritzapi-0.2.0-b${{ github.run_number }}.jar
asset_name: fritzapi-0.2.0-b${{ github.run_number }}.jar
asset_content_type: application/jar