-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (43 loc) · 1.11 KB
/
build.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
name: Java CI
on:
push:
tags:
- '*.*'
jobs:
buildJar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up PATH
run: |
echo "VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build mod
run: make -j$(nproc)
- name: Upload jar
uses: actions/upload-artifact@v2
with:
name: Desktop-only build
path: Routorio.jar
- name: Create release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
draft: false
prerelease: false
- name: Upload release jar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Routorio.jar
asset_name: Routorio.jar
asset_content_type: application/zip