Update StarDustV.txt #3
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: Create Release from StarDustV.txt | |
on: | |
push: | |
paths: | |
- 'SD_card_root/StarDust/StarDustV.txt' | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Get Version from StarDustV.txt | |
id: version | |
run: | | |
# Leer el contenido del archivo y eliminar saltos de línea y caracteres Windows | |
VERSION=$(cat SD_card_root/StarDust/StarDustV.txt | tr -d '\r' | tr -d '\n' | tr -d '[:space:]' | tr -cd '[:alnum:]-') | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "Cleaned VERSION: $VERSION" | |
- name: Create Release | |
run: | | |
# Intentar crear la release, y si falla, continuar | |
gh release create ${{ env.VERSION }} --title "StarDustCFW ${VERSION}" \ | |
--notes "# ES\n* Cambios menores \n# EN\n* Minnor Bugfixes\n\n\n##### Actualiza con el \`\`StarDust-Toolkit\`\` desde tu switch\n## [Guía detallada](https://github.com/StarDustCFW/StarDustCFWPack/blob/master/Guia.md)\n## [Detailed Guide](https://github.com/StarDustCFW/StarDustCFWPack/blob/master/Guide.md)" || true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Compress Release to File | |
run: | | |
sudo apt-get install rar -y | |
rar a -m5 -r -s "StarDustCFW.rar" ./SD_card_root/ | |
- name: Update Release | |
run: | | |
gh release upload ${{env.VERSION}} StarDustCFW.rar | |
gh release upload ${{env.VERSION}} ./SD_card_root/boot_payload.bin | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |