-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (71 loc) · 2.35 KB
/
app-debug-release.yml
File metadata and controls
81 lines (71 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Debug Release Logic
on:
workflow_dispatch:
inputs:
run_id:
description: 'The Run ID of the successful build'
required: true
version:
description: 'Version tag to simulate'
required: true
permissions:
actions: read
contents: write
jobs:
debug-release:
runs-on: ubuntu-latest
steps:
- name: Download artifacts from specific run
uses: dawidd6/action-download-artifact@v3
with:
run_id: ${{ inputs.run_id }}
path: artifacts
- name: Rename and Prepare Assets
run: |
mkdir release_assets
VERSION="${{ inputs.version }}"
# Android: Rename individual APKs
if [ -d "artifacts/android-apks" ]; then
cd artifacts/android-apks
for apk in *.apk; do
suffix="${apk#app-}"
abi="${suffix%-release.apk}"
cp "$apk" "../../release_assets/android-${abi}-${VERSION}.apk"
done
cd ../..
fi
# Windows: Zip
if [ -d "artifacts/windows-exe" ]; then
cd artifacts/windows-exe
zip -r "../../release_assets/windows-${VERSION}.zip" .
cd ../..
fi
# iOS: Rename
if [ -d "artifacts/ios-ipa" ]; then
find artifacts/ios-ipa -name "*.ipa" -exec cp {} "release_assets/ios-${VERSION}.ipa" \;
fi
# macOS: Rename
if [ -d "artifacts/macos-dmg" ]; then
find artifacts/macos-dmg -name "*.dmg" -exec cp {} "release_assets/macos-${VERSION}.dmg" \;
fi
echo "Files prepared:"
ls -l release_assets/
- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
configuration: ".github/changelog_config.json"
toTag: ${{ inputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Test Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.version }}
body: ${{ steps.build_changelog.outputs.changelog }}
files: release_assets/*
draft: true
prerelease: true
name: "Test Release ${{ inputs.version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}