Skip to content

Commit d95b9b3

Browse files
committed
Added github actions
1 parent ba61247 commit d95b9b3

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
9+
jobs:
10+
build-project:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout project sources
14+
uses: actions/checkout@v2
15+
- name: Setup Gradle
16+
uses: gradle/gradle-build-action@v2
17+
- name: Build project
18+
run: ./gradlew build
19+
- name: Create release
20+
id: create_release
21+
uses: actions/create-release@v1
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
24+
with:
25+
tag_name: ${{ github.ref }}
26+
release_name: ${{ github.ref }}
27+
draft: true
28+
prerelease: false
29+
- name: Upload artifact
30+
uses: actions/[email protected]
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
with:
34+
upload_url: ${{ steps.create_release.outputs.upload_url }}
35+
asset_path: ./build/libs/phpinnacle-toblerone-1.0.0.jar
36+
asset_name: phpinnacle-toblerone.jar
37+
asset_content_type: application/java-archive

.github/workflows/test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
run-tests:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout project sources
11+
uses: actions/checkout@v2
12+
- name: Setup Gradle
13+
uses: gradle/gradle-build-action@v2
14+
- name: Run tests with Gradle Wrapper
15+
run: ./gradlew test

0 commit comments

Comments
 (0)