-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 1.51 KB
/
snapshot.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Deployment
on:
workflow_dispatch:
inputs:
description:
description: 'release description'
required: true
default: '— no description providen'
version:
description: 'release version'
required: true
jobs:
buildAndUpload:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: compile
id: compile
env:
version: ${{ github.event.inputs.version }}
description: ${{ github.event.inputs.description }}
run: |
sed -i "s/version = v1\.0/version = $version/g" lib/build.gradle.kts
chmod +x gradlew
./gradlew jar
echo "::set-output name=description::${description//\\n/%0A}"
- name: create release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: lib/build/libs/MKUI.jar
tag: ${{ github.event.inputs.version }}
body: ${{ steps.compile.outputs.description }}
- name: generate kotlin doc
run: ./gradlew dokkaHtml
- name: upload kotlin doc
run: |
rm -rf docs/*
mkdir -p docs
mv -f lib/build/dokka/html/* docs/
git config --global user.name 'Github Actions'
git config --global user.email '[email protected]'
git add -A
git commit -am "[auto] upload kotlin docs" || true
git push || true