feat: Add Botania, Comforts, Scholar, BiomesWeveGone translations #4
Workflow file for this run
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: Auto Release | |
| on: | |
| push: | |
| tags: | |
| - '*' # Triggers when any tag is pushed | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required to get all repository information | |
| - name: Get tag and repository info | |
| id: info | |
| run: | | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| REPO_NAME=${GITHUB_REPOSITORY##*/} | |
| BRANCH=$(git branch -r --contains $TAG_NAME | head -1 | sed 's/.*\///') | |
| RENAMED_TAG="${BRANCH}-${TAG_NAME}" | |
| echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT | |
| echo "repo=$REPO_NAME" >> $GITHUB_OUTPUT | |
| echo "branch=$BRANCH" >> $GITHUB_OUTPUT | |
| echo "renamed_tag=$RENAMED_TAG" >> $GITHUB_OUTPUT | |
| echo "Original tag: $TAG_NAME" | |
| echo "Repository: $REPO_NAME" | |
| echo "Branch: $BRANCH" | |
| echo "Renamed tag: $RENAMED_TAG" | |
| - name: Create renamed tag | |
| uses: rickstaa/action-create-tag@v1 | |
| id: create_tag | |
| with: | |
| tag: "${{ steps.info.outputs.renamed_tag }}" | |
| message: "Release ${{ steps.info.outputs.tag }} for branch ${{ steps.info.outputs.branch }}" | |
| force_push_tag: true | |
| tag_exists_error: false | |
| - name: Create Archive Release | |
| uses: OctopusDeploy/create-zip-package-action@v3 | |
| with: | |
| package_id: 'HLPack-${{ steps.info.outputs.branch }}' | |
| version: '${{ steps.info.outputs.tag }}' | |
| output_folder: '.' | |
| base_path: '.' | |
| files: | | |
| pack.mcmeta | |
| pack.png | |
| **/lang/es_es.json | |
| **/journal_lang/es_es.json | |
| **/bestiary/es_es_0/**/* | |
| **/patchouli_books/*/es_es/**/* | |
| - name: Upload Release | |
| uses: ncipollo/release-action@v1.12.0 | |
| with: | |
| tag: ${{ steps.info.outputs.renamed_tag }} | |
| name: HL Pack [${{ steps.info.outputs.branch }}] ${{ steps.info.outputs.tag }} | |
| body: | | |
| ## Hispanic Localization Pack for Minecraft [${{ steps.info.outputs.branch }}] | |
| ### Installation | |
| 1. Download the attached ZIP file | |
| 2. Place it in your `resourcepacks` folder in Minecraft | |
| 3. Activate it in the game from Options > Resource Packs | |
| --- | |
| ### Supported Mods | |
| See the list of translated mods here: | |
| [View supported mods list](https://github.com/HectorZaGa/${{ steps.info.outputs.repo }}/blob/${{ steps.info.outputs.branch }}/MODS_LIST.md) | |
| --- | |
| *Automatically generated by GitHub Actions* | |
| artifacts: "HLPack-${{ steps.info.outputs.branch }}.${{ steps.info.outputs.tag }}.zip" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| draft: false | |
| prerelease: false | |
| - name: Delete original tag | |
| run: | | |
| echo "Deleting original tag: ${{ steps.info.outputs.tag }}" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git push origin :refs/tags/${{ steps.info.outputs.tag }} || echo "Tag deletion failed or already deleted" | |
| - name: Show release info | |
| run: | | |
| echo "Release created successfully!" | |
| echo "Original tag: ${{ steps.info.outputs.tag }}" | |
| echo "Release tag: ${{ steps.info.outputs.renamed_tag }}" | |
| echo "Branch: ${{ steps.info.outputs.branch }}" | |
| ZIP_NAME="HLPack-${{ steps.info.outputs.branch }}.${{ steps.info.outputs.tag }}.zip" | |
| echo "File: $ZIP_NAME" | |
| echo "Check the Releases section of your repository to see the result" |