Create MCPACK and release #12
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 Upload to Release | |
on: | |
workflow_dispatch: # This allows manual triggering | |
jobs: | |
zip_and_upload: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Zip the current directory | |
run: | | |
zip -r archive.zip . | |
- name: Install GitHub CLI | |
run: | | |
sudo apt update | |
sudo apt install -y gh | |
- name: Authenticate GitHub CLI | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
echo "${GH_TOKEN}" | gh auth login --with-token | |
- name: Get latest release tag | |
id: get_release | |
run: | | |
LATEST_TAG=$(gh release view --json tagName -q '.tagName') | |
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV | |
- name: Upload zip to the latest release | |
run: | | |
gh release upload "$LATEST_TAG" archive.zip --repo faizul726/oreui-utilities --clobber |