implement basic action for builds and updates
This commit is contained in:
parent
cc0beff88a
commit
b1d827c3de
1 changed files with 42 additions and 0 deletions
42
.github/workflows/main.yml
vendored
Normal file
42
.github/workflows/main.yml
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
name: main
|
||||||
|
on: push
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Variables
|
||||||
|
id: variables
|
||||||
|
run: echo ::set-output name=version::$(git describe --tags --always)
|
||||||
|
- name: Java
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
- name: Secrets
|
||||||
|
run: echo "${STORE_DATA}" | base64 --decode > store.jks
|
||||||
|
env:
|
||||||
|
STORE_DATA: ${{ secrets.STORE_DATA }}
|
||||||
|
- name: Build
|
||||||
|
uses: eskatos/gradle-command-action@v1
|
||||||
|
env:
|
||||||
|
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
|
||||||
|
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||||
|
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||||
|
with:
|
||||||
|
arguments: assemble
|
||||||
|
gradle-version: 6.7.1
|
||||||
|
- name: Move
|
||||||
|
run: mv app/build/outputs/apk/release/*.apk gelli-release-${version}.apk
|
||||||
|
env:
|
||||||
|
version: ${{ steps.variables.outputs.version }}
|
||||||
|
- name: Publish
|
||||||
|
if: startsWith(github.ref, 'refs/tags')
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
artifacts: '*.apk'
|
||||||
|
tag: ${{ steps.variables.outputs.version }}
|
||||||
|
commit: ${{ github.sha }}
|
||||||
|
token: ${{ github.token }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue