-
Notifications
You must be signed in to change notification settings - Fork 53
33 lines (31 loc) · 959 Bytes
/
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
name: Release
on:
push:
tags:
- '*'
jobs:
build:
name: Publish release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Install JDK ${{ matrix.java_version }}
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build project
run: ./gradlew build
env:
VERSION: ${{ github.ref }}
- run: |
assetsAAR=$(find . -name *release.aar | while read -r asset ; do echo "-a $asset" ; done)
VERSION=$(echo $VERSION | cut -d'/' -f3)
assetsJAR=$(find . -name *${VERSION}*.jar | while read -r asset ; do echo "-a $asset" ; done)
tag_name="${GITHUB_REF##*/}"
hub release create ${assetsAAR} ${assetsJAR} -m "$tag_name" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ github.ref }}