-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (79 loc) · 2.53 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Release
on:
push:
branches: [ "main" ]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: release
gradle-version: '7.3'
- name: Upload zip artifact
uses: actions/upload-artifact@v2
with:
name: nebula-quest-linux.zip
path: release/nebula-quest-linux.zip
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: release
gradle-version: '7.3'
- name: Upload zip artifact
uses: actions/upload-artifact@v2
with:
name: nebula-quest-windows.zip
path: release/nebula-quest-windows.zip
release:
needs: [linux, windows]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v2
- name: Display structure of downloaded files
run: ls -R
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Nebula Quest ${{ github.sha }}
draft: true
prerelease: false
- name: Upload linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: nebula-quest-linux.zip/nebula-quest-linux.zip
asset_name: nebula-quest-linux.zip
asset_content_type: application/zip
- name: Upload windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: nebula-quest-windows.zip/nebula-quest-windows.zip
asset_name: nebula-quest-windows.zip
asset_content_type: application/zip