Skip to content

Update version to 1.0.7 #45

Update version to 1.0.7

Update version to 1.0.7 #45

Workflow file for this run

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 11
uses: actions/setup-java@v3
with:
java-version: '11'
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: Save library to artifacts
# uses: actions/upload-artifact@v2
# with:
# path: trustdevice/build/outputs/aar/*
- name: Build App
run: ./gradlew app:assembleRelease
# - name: Save application to artifacts
# uses: actions/upload-artifact@v3
# with:
# path: app/build/outputs/apk/release/*
# - name: Download artifact
# uses: actions/download-artifact@v3
- 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/upload-release-asset@v1.0.1
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.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/upload-release-asset@v1.0.1
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