This repository has been archived by the owner on May 27, 2024. It is now read-only.
Update zip_resources.yml #92
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: Zip and Push to Archive Branch | |
on: | |
push: | |
branches: | |
- main # Trigger on pushes to main branch | |
jobs: | |
zip-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Ensure we get all the history | |
- name: Install zip | |
run: sudo apt-get install zip | |
- name: Zip the repository | |
run: zip -r resources.zip . -x "*.git*" | |
- name: Checkout archive branch | |
uses: actions/checkout@v2 | |
with: | |
ref: latest-release | |
path: latest-release | |
- name: Replace ZIP in archive branch | |
run: | | |
mv resources.zip latest-release/ | |
cd latest-release | |
git config user.name "FC Resources" | |
git config user.email "[email protected]" | |
git add resources.zip | |
git commit -m "Update resource pack ZIP" | |
git push | |