Skip to content

Illyrian's CI/CD

Illyrian's CI/CD #1

Workflow file for this run

name: Illyrian's CI/CD
run-name: "Illyrian's CI/CD"
on:
push:
branches: [main]
paths: ["illyriamc/**"]
jobs:
release:
name: Release
if: contains(github.event.head_commit.message, '.deploy')
runs-on: [ubuntu-latest]
steps:
- id: checkout
name: Checkout
uses: actions/checkout@main
- id: get_version
name: Get Version
run: |
cd illyriamc
echo "VERSION=$(jq -r '.version.name' pack.mcmeta)" >> $GITHUB_OUTPUT
- id: create_zip
name: Create Zip File
run: |
cd illyriamc
zip -r "../Illyria_v${{ steps.get_version.outputs.VERSION }}.zip" assets pack.mcmeta pack.png
- id: create_release
name: Create Release
uses: softprops/action-gh-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: ${{ contains(github.event.head_commit.message, '.draft') }}
files: Illyria_v${{ steps.get_version.outputs.VERSION }}.zip
generate_release_notes: true
prerelease: ${{ contains(github.event.head_commit.message, '.pre') }}
tag_name: ${{ steps.get_version.outputs.VERSION }}