Merge pull request #256 from AppDevNext/JitpackJava17 #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
name: Publish release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: 17 | |
- name: Find Tag | |
id: tagger | |
uses: jimschubert/query-tag-action@v2 | |
with: | |
skip-unshallow: 'true' | |
abbrev: false | |
commit-ish: HEAD | |
- name: Check pre-release | |
run: | | |
echo "tag=${{steps.tagger.outputs.tag}}" | |
if [[ ${{ steps.tagger.outputs.tag }} == *alpha* || ${{ steps.tagger.outputs.tag }} == *beta* ]] | |
then | |
prerelease=true | |
else | |
prerelease=false | |
fi | |
echo "PRE_RELEASE=$prerelease" >> $GITHUB_ENV | |
echo "prerelease=$prerelease" | |
- name: Install Android SDK | |
uses: malinskiy/action-android/install-sdk@release/0.1.4 | |
- name: Build project | |
run: ./gradlew assembleRelease | |
env: | |
VERSION: ${{ github.ref }} | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{steps.tagger.outputs.tag}} | |
generate_release_notes: true | |
prerelease: ${{ env.PRE_RELEASE }} | |
name: ${{steps.tagger.outputs.tag}} | |
files: | | |
./moka/build/outputs/aar/moka-release.aar | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |