Icon database upgrade #259
This file contains hidden or 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: Release HDL Batch Installer | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - 'Release**' | |
| - 'Release32**' | |
| - 'translations/**' | |
| - '.github/workflows/Repack-and-release.yml' | |
| repository_dispatch: | |
| types: [HDL_Dump_Updated_] | |
| jobs: | |
| Repack_and_Release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code for release | |
| uses: actions/checkout@v4 | |
| - name: "Check file existence" | |
| uses: andstor/file-existence-action@v3 | |
| with: | |
| files: "Release/HDL-Batch-installer.exe, Release/HDL.EXE, Release/boot.kelf, Release/Common/config.INI" | |
| fail: true | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install gettext p7zip dos2unix | |
| - name: get version from changelog | |
| shell: bash | |
| run: echo "VERSION=$(grep -m1 '\[*\]' Release/changes.log | sed 's/\[//' | sed 's/\]//' | awk '{$1=$1;print}')" >> "$GITHUB_ENV" | |
| id: version | |
| - name: get version from changelog as release tag | |
| shell: bash | |
| run: echo "VERSION_TAG=$(grep -m1 '\[*\]' Release/changes.log | sed 's/\[//' | sed 's/\]//' | sed -r 's/\s+//g' | sed 's/Aniversary/aniv/' | sed 's/Revision/rev/' | sed 's/Release/rel/'| awk '{$1=$1;print}')" >> "$GITHUB_ENV" | |
| id: tag | |
| - name: get version from changelog as release tag (clean) | |
| shell: bash | |
| run: echo "VERSION_TAG_CLEAN=$(grep -m1 '\[*\]' Release/changes.log | sed 's/\[//' | sed 's/\]//' | sed -r 's/\s+//g' | sed 's/-Aniversary/./' | sed 's/-Revision/./' | sed 's/-Release/./'| awk '{$1=$1;print}')" >> "$GITHUB_ENV" | |
| id: tagclean | |
| - name: Download Latest HDL-Dump | |
| run: | | |
| cd Release | |
| wget https://github.com/israpps/hdl-dump/releases/download/hdlinst/HDL.EXE -O $PWD/HDL.EXE | |
| - name: Trim changes of latest version | |
| run: | | |
| cd Release | |
| sed -n '/Change log/,/^$/{/^$/q; p}' changes.log >> ../latest_changes.log | |
| cd .. | |
| sed -i 's/^[[:blank:]]*//g' latest_changes.log | |
| sed -i 's/-/- /' latest_changes.log | |
| sed -i 's/Change log:/## Latest changes:\n/' latest_changes.log | |
| echo "****">>latest_changes.log | |
| echo "See Full changelog [__Here__](https://github.com/israpps/HDL-Batch-installer/blob/Latest/Release/changes.log)">>latest_changes.log | |
| echo ''>>latest_changes.log | |
| echo "----------------CHANGELOG----------------" | |
| cat latest_changes.log | |
| echo "----------------CHANGELOG----------------" | |
| - name: Compile translation catalogs | |
| run: | | |
| cd translations | |
| cd catalogs | |
| chmod +x ./build_catalogs.sh | |
| ./build_catalogs.sh | |
| - name: Create translation template package | |
| run: | | |
| DATEE=`date '+[%Y-%m-%d]'` | |
| mv translations HDLBinst-Translation-$DATEE | |
| 7z a -t7z -r Translation-template.7z HDLBinst-Translation-*/*.pot | |
| - name: convert \n to \r\n | |
| run: | | |
| cd Release | |
| unix2dos changes.log | |
| unix2dos README.TXT | |
| unix2dos HDL-Batch-installer.BAT | |
| cd Common | |
| unix2dos config.INI | |
| - name: delete previous tag/release | |
| if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') | |
| run: gh release delete Latest -y --cleanup-tag | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Repack latest build | |
| run: | | |
| SCH=${GITHUB_SHA::7} | |
| REF=${{ env.VERSION_TAG }} | |
| cd Release | |
| cd Common | |
| echo commit $SCH>commit.sys | |
| echo `date`>>commit.sys | |
| echo pkgid $REF >>commit.sys | |
| cd .. | |
| cd .. | |
| cp COPYING.* Release/ | |
| cp LICENSE Release/LICENSE | |
| cp -r Release "HDLBInst[${{ env.VERSION }}-x64]" | |
| 7z a -t7z -r HDLBInst-x64-$REF.7z HDLBInst*x64*/* | |
| - name: Upload artifacts | |
| if: ${{ success() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: HDL-INST | |
| path: | | |
| HDLBInst*.7z | |
| Translation-template.7z | |
| - name: Deploy pre-release | |
| uses: softprops/action-gh-release@v2 | |
| if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') | |
| with: | |
| token: "${{ secrets.GITHUB_TOKEN }}" | |
| fail_on_unmatched_files: true | |
| files: | | |
| HDLBInst*x64*.7z | |
| Translation-template.7z | |
| name: "${{ env.VERSION }}" | |
| tag_name: "Latest" | |
| body_path: 'latest_changes.log' | |
| prerelease: false | |
| - name: Deploy pre-release - separate tag | |
| uses: softprops/action-gh-release@v2 | |
| if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') | |
| with: | |
| token: "${{ secrets.GITHUB_TOKEN }}" | |
| fail_on_unmatched_files: true | |
| files: | | |
| HDLBInst*x64*.7z | |
| Translation-template.7z | |
| name: "${{ env.VERSION }}" | |
| tag_name: "${{ env.VERSION_TAG_CLEAN }}" | |
| body_path: 'latest_changes.log' | |
| prerelease: true | |
| discord_webhooks: | |
| needs: Repack_and_Release | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code for release | |
| uses: actions/checkout@v4 | |
| - name: get version from changelog | |
| shell: bash | |
| run: echo "VERSION=$(grep -m1 '\[*\]' Release/changes.log | sed 's/\[//' | sed 's/\]//' | awk '{$1=$1;print}')" >> "$GITHUB_ENV" | |
| id: version | |
| - name: get version from changelog as release tag | |
| shell: bash | |
| run: echo "version_tag=$(grep -m1 '\[*\]' Release/changes.log | sed 's/\[//' | sed 's/\]//' | sed -r 's/\s+//g' | sed 's/Revision/rev/' | sed 's/Release/rel/' | awk '{$1=$1;print}')" >> "$GITHUB_ENV" | |
| id: tag | |
| - name: Download artifact | |
| uses: actions/[email protected] | |
| with: | |
| name: HDL-INST | |
| - name: list | |
| run: | | |
| ls -R | |
| - name: Discord Webhook, Latest release | |
| if: github.event_name == 'push' | |
| uses: tsickert/[email protected] | |
| with: | |
| username: GitHub | |
| webhook-url: ${{ secrets.TESTERS_WEBHOOK }} | |
| content: "<@&859572447761793034> & <@&859615291477590046> , HDL Batch Installer has been updated some minutes ago\\n according to changelog: **[${{ env.VERSION }}]** \\n as always, you can download the latest version from here:\\n https://github.com/israpps/HDL-Batch-installer/releases/tag/Latest \\n or <#863913236457062421>" | |
| - name: Discord Webhook, Latest release | |
| if: github.event_name == 'repository_dispatch' | |
| uses: tsickert/[email protected] | |
| with: | |
| username: GitHub | |
| webhook-url: ${{ secrets.TESTERS_WEBHOOK }} | |
| content: "<@&859572447761793034> & <@&859615291477590046> , HDL Batch Installer **[${{ env.VERSION }}]** Has been **re-released** because **HDL Dump was updated** some minutes ago \\n as always, you can download the latest version from here:\\n https://github.com/israpps/HDL-Batch-installer/releases/tag/Latest \\n or <#863913236457062421>" | |
| - name: notify on PS2 discord | |
| if: github.ref == 'refs/heads/main' | |
| uses: tsickert/[email protected] | |
| with: | |
| webhook-url: ${{ secrets.DISCORD_FEED }} | |
| content: | | |
| ## HDL Batch Installer has been updated! | |
| ### [Download Page](https://github.com/israpps/${{ github.event.repository.name }}/releases/tag/Latest) | |
| - name: Upload release to discord backup | |
| uses: sinshutu/upload-to-discord@master | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.BACKUP_WEBHOOK }} | |
| with: | |
| args: HDLBInst*.7z | |