Create MCPACK and release #5
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 Add to Release | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: # This allows manual triggering of the workflow | |
jobs: | |
zip-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Set up Git user | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
- name: Get the latest tag | |
id: get_tag | |
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | |
- name: Zip the repository | |
run: | | |
zip -r $GITHUB_ENV.TAG.zip . | |
- name: Upload the zip file as a release asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: $GITHUB_ENV.TAG.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |