Skip to content

Automatic Type-Updating #630

Automatic Type-Updating

Automatic Type-Updating #630

name: "Automatic Type-Updating"
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
branches:
- master
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: "1"
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: "poetry install"
- name: Run script
id: script
run: "poetry run python tools/update_specific_types.py"
- name: More debug
run: "echo ${{ steps.script.outputs.release }}"
outputs:
publish: ${{ steps.script.outputs.release }}
new_tag: ${{ steps.script.outputs.tag }}
mv_ver: ${{ steps.script.outputs.mcver }}
test:
runs-on: ubuntu-latest
needs:
- update
steps:
- name: debug
run: "echo ${{ needs.update.outputs.publish }}"
publish:
runs-on: ubuntu-latest
needs:
- update
if: needs.update.outputs.publish == true
steps:
- name: Push
uses: stefanzweifel/git-auto-commit-action@v4
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.update.outputs.new_tag }}
release_name: Release ${{ github.ref }}
body: "Added support for Minecraft ${{ needs.update.outputs.mc_ver }}"
draft: false
prerelease: false