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
|
- name: Get app version
|
||||||
id: get_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
|
- name: Change wrapper permissions
|
||||||
run: chmod +x ./gradlew
|
run: chmod +x ./gradlew
|
||||||
|
|
||||||
- name: Build Debug APK
|
- name: Build debug APK
|
||||||
run: ./gradlew assembleDebug
|
run: ./gradlew assembleDebug
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create release
|
||||||
id: create_release
|
uses: softprops/action-gh-release@v2
|
||||||
uses: actions/create-release@v1
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ steps.get_version.outputs.version_name }}
|
files: |
|
||||||
release_name: Release ${{ github.ref }}
|
app/build/outputs/apk/debug/*.apk
|
||||||
draft: false
|
name: Release ${{ github.ref }}
|
||||||
prerelease: false
|
body: |
|
||||||
|
## Changes
|
||||||
- name: Upload Debug APK
|
- new version: ${{ env.VERSION_NAME }}
|
||||||
uses: actions/upload-release-asset@v1
|
- date: ${{ env.date_today }}
|
||||||
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
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user