forked from github/wulkanowy-mirror
switch to new release action
This commit is contained in:
parent
31744e7e77
commit
425d28d563
33
.github/workflows/android.yml
vendored
33
.github/workflows/android.yml
vendored
@ -35,31 +35,22 @@ jobs:
|
||||
|
||||
- name: Get app version
|
||||
id: get_version
|
||||
run: echo "version_name=$(grep -m1 "versionName" app/build.gradle | awk '{print $2}' | tr -d '\''"\'')" >> $GITHUB_ENV
|
||||
run: echo "VERSION_NAME=$(grep -m1 "versionName" app/build.gradle | awk '{print $2}' | tr -d \''"\')" >> $GITHUB_ENV
|
||||
|
||||
- name: Change wrapper permissions
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: Build Debug APK
|
||||
- name: Build debug APK
|
||||
run: ./gradlew assembleDebug
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
tag_name: v${{ steps.get_version.outputs.version_name }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Debug APK
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: app/build/outputs/apk/debug/*.apk
|
||||
asset_name: debug-${{ env.repository_name }}-${{ env.date_today }}.apk
|
||||
asset_content_type: application/vnd.android.package-archive
|
||||
files: |
|
||||
app/build/outputs/apk/debug/*.apk
|
||||
name: Release ${{ github.ref }}
|
||||
body: |
|
||||
## Changes
|
||||
- new version: ${{ env.VERSION_NAME }}
|
||||
- date: ${{ env.date_today }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user