Update jitpack.yml #51
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: | |
release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Lint | |
run: ./gradlew trustdevice:lint | |
- name: Test | |
run: ./gradlew trustdevice:test | |
- name: Build library | |
run: ./gradlew trustdevice:assembleRelease | |
- name: Build App | |
run: ./gradlew app:assembleRelease | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Set release name | |
run: echo RELEASE_NAME=${GITHUB_REF} >> $GITHUB_ENV | |
- name: Get version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ env.RELEASE_NAME }} | |
body: | |
update demo app. | |
draft: false | |
prerelease: false | |
- name: Upload aar to release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./trustdevice/build/outputs/aar/trustdevice-release.aar | |
asset_name: trustdevice-release-${{ steps.get_version.outputs.VERSION }}.aar | |
# Common MIME types:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types | |
asset_content_type: application/zip | |
- name: Upload apk to release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./app/build/outputs/apk/release/TrustDevice-release-${{ steps.get_version.outputs.VERSION }}.apk | |
asset_name: TrustDevice-release-${{ steps.get_version.outputs.VERSION }}.apk | |
# Common MIME types:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types | |
asset_content_type: application/zip |