-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (34 loc) · 1.12 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: New Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init values
id: values
run: |
version=$(grep -Po -m 1 '(?<=versionName ).*' ./app/build.gradle | tr -d \")
echo ::set-output name=name::Sudoku v$version
echo ::set-output name=tag::v$version
echo ::set-output name=apk::Sudoku_v$version
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: ${{ steps.values.outputs.name }}
tag_name: ${{ steps.values.outputs.tag }}
body: No changelog
- name: Add apk
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./app/release/app-release.apk
asset_name: ${{ steps.values.outputs.apk }}.apk
asset_content_type: application/vnd.android.package-archive