-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (58 loc) · 2.06 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
name: Release addon
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '21'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build --full-stacktrace
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/*-release.jar
- name: Get Addon Version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: 'core/src/main/resources/transporter/updateInfo.json'
prop_path: 'version'
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{steps.version.outputs.prop}}
release_name: Transporter Addon ${{steps.version.outputs.prop}}
body: |
Klik under for at hente dette release
draft: true
prerelease: false
- name: Upload Transporter Build To Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/libs/TransporterAddon-release.jar
asset_name: transporter-laby4.jar
asset_content_type: application/jar
- name: Upload updateInfo.json To Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: core/src/main/resources/transporter/updateInfo.json
asset_name: updateInfo.json
asset_content_type: application/json