Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Commit 1bc0082

Browse files
committed
Publish github release on tag
1 parent 26c5f26 commit 1bc0082

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI
22

3-
on: [ push, pull_request ]
3+
on:
4+
push:
5+
branches:
6+
- kotlin
7+
pull_request:
48

59
jobs:
610
check:
@@ -78,4 +82,4 @@ jobs:
7882
path: ~/.gradle/caches
7983
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle/wrapper/gradle-wrapper.properties', '**/buildSrc/src/main/kotlin/**.kt') }}
8084
- name: Build
81-
run: ./gradlew --parallel app:assembleRelease
85+
run: ./gradlew app:assemble

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
name: Github Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-java@v2
15+
with:
16+
distribution: 'zulu'
17+
java-version: 11
18+
- uses: actions/cache@v2
19+
with:
20+
path: ~/.gradle/caches
21+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle/wrapper/gradle-wrapper.properties', '**/buildSrc/src/main/kotlin/**.kt') }}
22+
- name: Build APK
23+
run: ./gradlew app:assembleOnlineRelease
24+
- name: Create Release
25+
uses: ncipollo/release-action@v1
26+
with:
27+
artifacts: "app/build/*.apk"
28+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)