Skip to content

Commit c728377

Browse files
authored
Update build-android-lua.yml
1 parent 4b57149 commit c728377

1 file changed

Lines changed: 28 additions & 86 deletions

File tree

.github/workflows/build-android-lua.yml

Lines changed: 28 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -165,90 +165,32 @@ jobs:
165165
runs-on: ubuntu-latest
166166
needs: build-android
167167
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
168-
168+
169169
steps:
170-
- name: Checkout repository
171-
uses: actions/checkout@v4
172-
173-
- name: Download all artifacts
174-
uses: actions/download-artifact@v4
175-
with:
176-
path: artifacts
177-
pattern: lua-*-android-*
178-
merge-multiple: true
179-
180-
- name: Create release archive
181-
run: |
182-
# Create a zip file containing all architectures
183-
RELEASE_NAME="lua-android-${{ env.LUA_VERSION }}"
184-
mkdir -p $RELEASE_NAME
185-
186-
# Copy all architecture files
187-
for arch in armeabi-v7a arm64-v8a x86 x86_64; do
188-
if [ -d "artifacts/lua-${{ env.LUA_VERSION }}-android-$arch" ]; then
189-
mkdir -p "$RELEASE_NAME/$arch"
190-
cp artifacts/lua-${{ env.LUA_VERSION }}-android-$arch/*.so "$RELEASE_NAME/$arch/"
191-
fi
192-
done
193-
194-
# Create README file
195-
cat > $RELEASE_NAME/README.md << EOF
196-
# Lua ${{ env.LUA_VERSION }} for Android
197-
198-
Prebuilt Lua ${{ env.LUA_VERSION }} shared libraries for Android.
199-
200-
## Architectures
201-
202-
- armeabi-v7a
203-
- arm64-v8a
204-
- x86
205-
- x86_64
206-
207-
## Files
208-
209-
Each directory contains:
210-
- \`liblua-${{ env.LUA_VERSION }}-android-<arch>.so\` - Versioned library name
211-
- \`liblua.so\` - Generic library name for compatibility
212-
213-
## Usage
214-
215-
Copy the appropriate \`.so\` file to your Android project's \`jniLibs\` directory.
216-
217-
## Build Info
218-
219-
- Built with Android NDK ${{ env.ANDROID_NDK_VERSION }}
220-
- Minimum API Level: ${{ env.ANDROID_API_LEVEL }}
221-
- Build Date: $(date -u +"%Y-%m-%d")
222-
EOF
223-
224-
# Create zip archive
225-
zip -r $RELEASE_NAME.zip $RELEASE_NAME/
226-
227-
# Create individual architecture archives
228-
for arch in armeabi-v7a arm64-v8a x86 x86_64; do
229-
if [ -d "$RELEASE_NAME/$arch" ]; then
230-
cd $RELEASE_NAME/$arch
231-
zip ../../lua-${{ env.LUA_VERSION }}-android-$arch.zip *.so
232-
cd ../..
233-
fi
234-
done
235-
236-
echo "ASSET_NAME=$RELEASE_NAME.zip" >> $GITHUB_ENV
237-
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
238-
239-
- name: Create Release
240-
uses: softprops/action-gh-release@v1
241-
with:
242-
name: Lua ${{ env.LUA_VERSION }} for Android
243-
tag_name: Lua ${{ env.LUA_VERSION }} for Android
244-
files: |
245-
${{ env.ASSET_NAME }}
246-
lua-${{ env.LUA_VERSION }}-android-armeabi-v7a.zip
247-
lua-${{ env.LUA_VERSION }}-android-arm64-v8a.zip
248-
lua-${{ env.LUA_VERSION }}-android-x86.zip
249-
lua-${{ env.LUA_VERSION }}-android-x86_64.zip
250-
generate_release_notes: true
251-
draft: false
252-
prerelease: false
253-
env:
254-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170+
- name: Checkout repository
171+
uses: actions/checkout@v4
172+
173+
- name: Download all artifacts
174+
uses: actions/download-artifact@v4
175+
with:
176+
path: artifacts
177+
pattern: lua-*-android-*
178+
merge-multiple: true
179+
180+
- name: List downloaded files (debug)
181+
run: |
182+
echo "Downloaded artifacts:"
183+
find artifacts -type f
184+
185+
- name: Create Release
186+
uses: softprops/action-gh-release@v1
187+
with:
188+
name: Lua ${{ env.LUA_VERSION }} for Android
189+
tag_name: Lua ${{ env.LUA_VERSION }} for Android
190+
files: |
191+
artifacts/**/*.so
192+
generate_release_notes: false
193+
draft: false
194+
prerelease: false
195+
env:
196+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)