Skip to content

Sten's CI/CD

Sten's CI/CD #21

Workflow file for this run

name: Sten's CI/CD
run-name: "Sten's CI/CD"
on:
push:
branches: [main]
paths: ["illyria/**"]
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: echo "VERSION=$(jq -r '.version.name' illyria/pack.mcmeta)" >> $GITHUB_OUTPUT
- id: create_zip
name: Create Zip File
run: zip -r "Illyria_v${{ steps.get_version.outputs.VERSION }}.zip" illyria/assets illyria/pack.mcmeta illyria/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 }}