Skip to content

Commit db82e26

Browse files
committed
claims automatic build8
1 parent 81fccec commit db82e26

1 file changed

Lines changed: 33 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,38 @@ jobs:
4545
mkdir -p artifacts
4646
cp claimManagement/build/outputs/apk/comoresDev/debug/claimManagement-comoresDev-debug.apk artifacts/claims-comores-test.apk
4747
48-
- name: Upload APK
48+
- name: Generate release timestamp
49+
id: timestamp
50+
run: echo "timestamp=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
51+
52+
- name: Create Release
53+
id: create_release
54+
uses: actions/create-release@v1
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
with:
58+
tag_name: build-${{ steps.timestamp.outputs.timestamp }}
59+
release_name: Comores Build ${{ steps.timestamp.outputs.timestamp }}
60+
draft: false
61+
prerelease: true
62+
body: |
63+
Automated build from branch ${{ github.ref_name }}
64+
Commit: ${{ github.sha }}
65+
Build date: $(date +'%Y-%m-%d %H:%M:%S')
66+
67+
- name: Upload APK as Release Asset
68+
uses: actions/upload-release-asset@v1
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
with:
72+
upload_url: ${{ steps.create_release.outputs.upload_url }}
73+
asset_path: ./artifacts/claims-comores-test.apk
74+
asset_name: claims-comores-test.apk
75+
asset_content_type: application/vnd.android.package-archive
76+
77+
78+
- name: Upload APK as Artifact (backup)
4979
uses: actions/upload-artifact@v4
5080
with:
51-
name: claims-comores-test.apk
52-
path: artifacts/claims-comores-test.apk
53-
if-no-files-found: error
81+
name: claims-comores-test
82+
path: artifacts/claims-comores-test.apk

0 commit comments

Comments
 (0)