Skip to content

New Crowdin updates #341

New Crowdin updates

New Crowdin updates #341

Workflow file for this run

name: Build Pack
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
workflow_dispatch:
jobs:
build:
if: ${{ github.event.pull_request.title == 'New Crowdin updates' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
gameVersion: [1.19]
runs-on: ubuntu-latest
env:
file_path: files/RPMTW-Translate-Resource-Pack-${{ matrix.gameVersion }}
steps:
- uses: actions/checkout@v3
- name: Compressed the resource pack to a zip file
uses: vimtor/action-zip@v1
with:
files: translated/zh_tw/source/zh_tw/${{ matrix.gameVersion }} meta/${{ matrix.gameVersion }} LICENSE
dest: ${{ env.file_path }}.zip
- name: Upload file
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.gameVersion }}
path: ${{ env.file_path }}.zip
retention-days: 1
release:
if: ${{ github.event.pull_request.title == 'New Crowdin updates' || github.event_name == 'workflow_dispatch' }}
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download files
uses: actions/download-artifact@v3
- name: Release files
uses: ncipollo/release-action@v1
with:
name: Version ${{ github.run_number }}
generateReleaseNotes: true
artifacts: "*/*.zip"
tag: v${{ github.run_number }}
allowUpdates: true
- name: Merge Pull Request
if: ${{ github.event_name == 'pull_request' }}
uses: juliangruber/merge-pull-request-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.pull_request.number }}
method: squash
repo: ${{ github.repository.full_name }}