Skip to content

Merge pull request #217 from theogiraudet/fix_ci #3

Merge pull request #217 from theogiraudet/fix_ci

Merge pull request #217 from theogiraudet/fix_ci #3

Workflow file for this run

name: 🔖 Upload build assets
on:
push:
tags: [ 'v*.*.*' ]
jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install -e ./scripts
- name: Set environment variables
run: |
TAG=${{ github.ref_name }}
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
echo "MC_VERSION=$(python -c 'import definitions; print(definitions.MC_VERSION)')" >> $GITHUB_ENV
echo "BUILD_PATH=$(python -c 'import definitions; print(definitions.BUILD_PATH)')" >> $GITHUB_ENV
- name: Package datapacks
run: python scripts/ci/distribute_release_wf.py -v ${{ env.MC_VERSION }}-${{ env.VERSION }} -w 0
- name: Package world
uses: aksiome/minecraft-package@master
with:
config: .mcwpack.yml
source: .
target: ${{ env.BUILD_PATH }}/bookshelf-world-${{ env.MC_VERSION }}-${{ env.VERSION }}.zip
- name: Upload artifacts
uses: softprops/action-gh-release@v2
with:
files: ${{ env.BUILD_PATH }}/*.zip
- name: Update latest tag
uses: EndBug/latest-tag@latest