Skip to content

Commit d699f62

Browse files
authored
Add version parameter (#12)
1 parent 6298a64 commit d699f62

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

.github/workflows/pre-release.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ name: Pre Release
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Release version'
8+
required: true
59

610
jobs:
7-
build:
8-
name: Release
11+
pre-release:
12+
name: Pre Release
913
runs-on: ubuntu-latest
1014

1115
steps:
@@ -32,25 +36,12 @@ jobs:
3236
restore-keys: |
3337
${{ runner.os }}-gradle-
3438
35-
- uses: actions/github-script@v3
36-
id: release-version
37-
with:
38-
github-token: ${{secrets.GITHUB_TOKEN}}
39-
result-encoding: string
40-
script: |
41-
const list = await github.repos.listReleases({
42-
owner: "domaframework",
43-
repo: "sandbox",
44-
});
45-
console.log(list)
46-
return list.data[0].name
47-
48-
- name: Release ${{steps.release-version.outputs.result}}
39+
- name: Pre Release ${{ github.event.inputs.version }}
4940
run: |
5041
java -version
5142
git config --global user.name "github-actions[bot]"
5243
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
53-
./gradlew release -Prelease.releaseVersion=${{steps.release-version.outputs.result}}
44+
./gradlew release -Prelease.releaseVersion=${{ github.event.inputs.version }}
5445
5546
- name: Upload reports
5647
if: failure()

0 commit comments

Comments
 (0)