Skip to content

Commit

Permalink
test 5
Browse files Browse the repository at this point in the history
  • Loading branch information
gulabsagevadiya committed Aug 28, 2024
1 parent ead670e commit a0a1ca0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,31 @@ jobs:
run: |
if [ "${{ env.version_name }}" == "${{ env.latest_tag }}" ]; then
echo "Version ${VERSION_NAME} is the same as the latest release. Skipping build and release."
exit 0
echo "skip_build=true" >> $GITHUB_ENV
else
echo "Version ${VERSION_NAME} is different from the latest release. Proceeding with build and release."
echo "skip_build=false" >> $GITHUB_ENV
fi
- name: Build APK
if: success()
if: ${{ env.skip_build == 'false' }}
run: ./gradlew assembleRelease

- name: Upload APK as artifact
if: success()
if: ${{ env.skip_build == 'false' }}
uses: actions/upload-artifact@v3
with:
name: app-release
path: app/build/outputs/apk/release/app-release-unsigned.apk

- name: Download APK artifact
if: success()
if: ${{ env.skip_build == 'false' }}
uses: actions/download-artifact@v3
with:
name: app-release


- name: Create GitHub Release
if: success()
if: ${{ env.skip_build == 'false' }}
id: create_release
uses: actions/create-release@v1
env:
Expand All @@ -84,12 +84,12 @@ jobs:
body: "Automated release for build #${{ env.version_name }}"

- name: Upload APK to Release
if: success()
if: ${{ env.skip_build == 'false' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./app-release-unsigned.apk
asset_name: textAutomater.apk
asset_content_type: application/vnd.android.package-archive
asset_content_type: application/vnd.android.package-archive

0 comments on commit a0a1ca0

Please sign in to comment.