Skip to content

Commit

Permalink
Refactor workflow files for Android, Linux, and Windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjay7178 committed Aug 22, 2024
1 parent ae6eb92 commit e232298
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 50 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,20 @@ jobs:
fyne-cross/dist/android-arm/
fyne-cross/dist/android-arm64/
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v2
with:
name: android
- name: Rename APK files
run: |
mv fyne-cross/dist/android/${{ env.APP_NAME }}.apk fyne-cross/dist/android/${{ env.APP_NAME }}_${{ github.ref_name }}.apk
mv fyne-cross/dist/android-386/${{ env.APP_NAME }}.apk fyne-cross/dist/android-386/${{ env.APP_NAME }}_${{ github.ref_name }}.apk
mv fyne-cross/dist/android-amd64/${{ env.APP_NAME }}.apk fyne-cross/dist/android-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}.apk
mv fyne-cross/dist/android-arm/${{ env.APP_NAME }}.apk fyne-cross/dist/android-arm/${{ env.APP_NAME }}_${{ github.ref_name }}.apk
mv fyne-cross/dist/android-arm64/${{ env.APP_NAME }}.apk fyne-cross/dist/android-arm64/${{ env.APP_NAME }}_${{ github.ref_name }}.apk
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
fyne-cross/dist/android/${{ env.APP_NAME }}.apk
fyne-cross/dist/android-386/${{ env.APP_NAME }}.apk
fyne-cross/dist/android-amd64/${{ env.APP_NAME }}.apk
fyne-cross/dist/android-arm/${{ env.APP_NAME }}.apk
fyne-cross/dist/android-arm64/${{ env.APP_NAME }}.apk
fyne-cross/dist/android/${{ env.APP_NAME }}_${{ github.ref_name }}.apk
fyne-cross/dist/android-386/${{ env.APP_NAME }}_${{ github.ref_name }}.apk
fyne-cross/dist/android-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}.apk
fyne-cross/dist/android-arm/${{ env.APP_NAME }}_${{ github.ref_name }}.apk
fyne-cross/dist/android-arm64/${{ env.APP_NAME }}_${{ github.ref_name }}.apk
28 changes: 7 additions & 21 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,14 @@ jobs:
with:
name: linux
path: fyne-cross/dist/linux-amd64/


- name: Rename tar.xz file
run: |
mv fyne-cross/dist/linux-amd64/${{ env.APP_NAME }}.tar.xz fyne-cross/dist/linux-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}.tar.xz
create-release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Linux Artifact
uses: actions/download-artifact@v2
with:
name: linux

# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# draft: false
# prerelease: false

- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: fyne-cross/dist/linux-amd64/${{ env.APP_NAME }}.tar.xz
files: fyne-cross/dist/linux-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}.tar.xz
21 changes: 5 additions & 16 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,12 @@ jobs:
name: windows
path: fyne-cross/dist/windows-amd64/

create-windows-release:
needs: build-windows
runs-on: ubuntu-latest
steps:
- name: Download Windows Artifact
uses: actions/download-artifact@v2
with:
name: windows

# - name: Get Release Info
# id: get_release
# uses: bruceadams/get-release@v1.2.3
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Rename exe file
run: |
mv fyne-cross/dist/windows-amd64/${{ env.APP_NAME }}.exe fyne-cross/dist/windows-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}.exe
- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: |
fyne-cross/dist/windows-amd64/${{ env.APP_NAME }}.exe
files: fyne-cross/dist/windows-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}.exe

0 comments on commit e232298

Please sign in to comment.