Skip to content

optimize code

optimize code #3

Workflow file for this run

name: Android CI
on:
push:
branches: [ master ]
paths:
- '**/WorkflowsTrigger.kt'
env:
TZ: Asia/Shanghai
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: set up jdk 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "oracle"
cache: gradle
- name: grant execute permission for gradlew
run: chmod +x gradlew
- name: build apk with gradle
run: ./gradlew app:assembleRelease
- name: get current time
id: currentTime
run: echo "time=$(date +'%Y.%m.%d')" >> $GITHUB_OUTPUT
- name: create a release
uses: ncipollo/release-action@v1
with:
artifacts: "app/build/outputs/apk/release/*.apk"
body: "create by workflows"
allowUpdates: true
artifactErrorsFailBuild: true
generateReleaseNotes: false
token: ${{ secrets.ACTION_TOKEN }}
name: v${{ steps.currentTime.outputs.time }}
tag: ${{ steps.currentTime.outputs.time }}