-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (72 loc) · 2.5 KB
/
Copy pathrelease.yml
File metadata and controls
85 lines (72 loc) · 2.5 KB
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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Release 0.1.0-SNAPSHOT
on:
workflow_dispatch:
jobs:
build:
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'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload Platform artifact
uses: actions/upload-artifact@v3
with:
name: platform-artifacts
path: target/platform-0.1.0-SNAPSHOT.jar
- name: Upload Coderunner artifact
uses: actions/upload-artifact@v3
with:
name: coderunner-script
path: coderunner/coderunner.sh
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Platform artifact
uses: actions/download-artifact@v3
with:
name: platform-artifacts
- name: Download Coderunner artifact
uses: actions/download-artifact@v3
with:
name: coderunner-script
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 0.1.0-SNAPSHOT
release_name: Release 0.1.0-SNAPSHOT
draft: false
prerelease: false
- name: Upload Jar 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: ./platform-0.1.0-SNAPSHOT.jar
asset_name: platform-0.1.0-SNAPSHOT.jar
asset_content_type: application/java-archive
- name: Upload Coderunner 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: ./coderunner.sh
asset_name: coderunner.sh
asset_content_type: text/x-sh