cloner-package-windows #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cloner-package-windows | |
on: | |
workflow_dispatch: | |
env: | |
TERM: linux | |
VERSION: 2.5.50 | |
jobs: | |
buildroot: | |
name: cloner_profile | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Clone ingenic-cloner-archives | |
run: git clone https://github.com/gtxaspec/ingenic-cloner-archives | |
- name: Create temporary directory | |
run: mkdir -p cloner-tmp | |
- name: Extract 7zip archives | |
working-directory: cloner-tmp | |
run: 7z x ../ingenic-cloner-archives/windows/${{ env.VERSION }}/cloner-${{ env.VERSION }}-windows_alpha.zip.tar.7z.000 | |
- name: Extract tar.gz.tar archive | |
working-directory: cloner-tmp | |
run: tar -xf cloner-${{ env.VERSION }}-windows_alpha.zip.tar | |
- name: Extract zip archive | |
working-directory: cloner-tmp | |
run: 7z x cloner-${{ env.VERSION }}-windows_alpha.zip | |
- name: Copy repository data | |
working-directory: cloner-tmp | |
run: | | |
cp -R ../0_Firmware_Root cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha | |
cp -R ../configs cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha | |
cp -R ../ddrs cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha | |
cp -R ../firmwares cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha | |
- name: Prune unnecessary content | |
working-directory: cloner-tmp | |
run: | | |
rm -rf cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha/adb | |
rm -rf cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha/scripts | |
rm -rf cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha/security | |
rm -rf cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha/securitytool | |
rm -rf cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha/docs | |
- name: Compress final archive | |
working-directory: cloner-tmp | |
run: | | |
mv cloner-${{ env.VERSION }}-windows_alpha cloner-${{ env.VERSION }}-windows_thingino | |
7z a -t7z -mx=9 cloner-${{ env.VERSION }}-windows_thingino.7z cloner-${{ env.VERSION }}-windows_thingino | |
echo "ZIP_NAME=$(pwd)/cloner-${{ env.VERSION }}-windows_thingino.7z" >> $GITHUB_ENV | |
- name: Upload cloner package as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cloner-${{ env.VERSION }}-windows_thingino | |
path: ${{ env.ZIP_NAME }} | |
- name: Upload cloner package | |
if: github.event_name != 'pull_request' | |
uses: softprops/action-gh-release@master | |
with: | |
tag_name: latest | |
files: ${{ env.ZIP_NAME }} |