File tree 2 files changed +71
-0
lines changed
2 files changed +71
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Java CI
2
+
3
+ on : [push]
4
+
5
+ jobs :
6
+ build :
7
+
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ with :
13
+ fetch-depth : 0
14
+ - name : Get Fetch Tags
15
+ run : git -c protocol.version=2 fetch --tags --progress --no-recurse-submodules origin
16
+ if : " !contains(github.ref, 'refs/tags')"
17
+ - name : Set up JDK 11
18
+ uses : actions/setup-java@v1
19
+ with :
20
+ java-version : 11
21
+ - name : Grant execute permission for gradlew
22
+ run : chmod +x gradlew
23
+ - name : Build with Gradle
24
+ run : ./gradlew build
25
+ - name : Get Release Version
26
+ id : get_version
27
+ run : VERSION=$(./gradlew currentVersion -q -Prelease.quiet) && echo ::set-output name=VERSION::$VERSION
28
+ - name : Upload multiline-regex-datacapture-filter jar
29
+
30
+ with :
31
+ # Artifact name
32
+ name : Grails-Plugin-${{ steps.get_version.outputs.VERSION }}
33
+ # Directory containing files to upload
34
+ path : build/libs/multiline-regex-datacapture-filter-${{ steps.get_version.outputs.VERSION }}.jar
Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+ # Sequence of patterns matched against refs/tags
4
+ tags :
5
+ - ' *' # Push events to matching v*, i.e. v1.0, v20.15.10
6
+
7
+ name : Upload Release Asset
8
+
9
+ jobs :
10
+ build :
11
+ name : Upload Release Asset
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout code
15
+ uses : actions/checkout@v4
16
+ with :
17
+ fetch-depth : 0
18
+ - name : set up JDK 11
19
+ uses : actions/setup-java@v4
20
+ with :
21
+ java-version : 11
22
+ distribution : ' zulu'
23
+ - name : Build with Gradle
24
+ run : ./gradlew build
25
+ - name : Get Release Version
26
+ id : get_version
27
+ run : VERSION=$(./gradlew currentVersion -q -Prelease.quiet) && echo ::set-output name=VERSION::$VERSION
28
+ - name : Create Release
29
+ id : create_release
30
+ run : |
31
+ gh release create \
32
+ --generate-notes \
33
+ --title 'Release ${{ steps.get_version.outputs.VERSION }}' \
34
+ ${{ github.ref_name }} \
35
+ build/libs/multiline-regex-datacapture-filter-${{ steps.get_version.outputs.VERSION }}.jar
36
+ env :
37
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments