Skip to content

Commit 0d47923

Browse files
committed
Add release.yml
1 parent 9febbe6 commit 0d47923

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
name: Release
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Set up JDK 8
13+
uses: actions/setup-java@v1
14+
with:
15+
java-version: 8
16+
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Grant execute permission for gradlew
21+
run: chmod +x gradlew
22+
23+
- name: Cache Gradle
24+
uses: actions/cache@v2
25+
with:
26+
path: |
27+
~/.gradle/caches
28+
~/.gradle/wrapper
29+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
30+
restore-keys: |
31+
${{ runner.os }}-gradle-
32+
33+
- uses: actions/github-script@v3
34+
id: set-release-name
35+
with:
36+
github-token: ${{secrets.GITHUB_TOKEN}}
37+
script: |
38+
const result = await github.repos.listReleases({
39+
owner: "domaframework",
40+
repo: "sandbox",
41+
});
42+
console.log(result)
43+
return result
44+
45+
- name: Get result
46+
run: echo "${{steps.set-release-name.outputs.result.name}}"
47+
48+
# - name: Assemble & Check
49+
# run: ./gradlew assemble check
50+
51+
- name: Upload reports
52+
if: failure()
53+
uses: actions/upload-artifact@v2
54+
with:
55+
name: build
56+
path: ./**/build/reports

0 commit comments

Comments
 (0)