Skip to content

Create MCPACK and release #19

Create MCPACK and release

Create MCPACK and release #19

Workflow file for this run

name: Create and Upload .mcpack Archive
on:
workflow_dispatch: # Triggered manually
jobs:
zip_and_upload:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the current repository
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Create the zip file with .mcpack extension
- name: Create .zip.mcpack file
run: |
zip -r "${GITHUB_REPOSITORY##*/}.zip.mcpack" ./*
# Step 3: Get the latest release information
- name: Get latest release
id: get_latest_release
uses: dawidd6/action-get-latest-release@v3
# Step 4: Upload the .mcpack file to the latest release
- name: Upload .zip.mcpack to release
uses: actions/upload-release-asset@v1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
release_id: ${{ steps.get_latest_release.outputs.id }}
asset_path: "${GITHUB_REPOSITORY##*/}.zip.mcpack"
asset_name: "${GITHUB_REPOSITORY##*/}.zip.mcpack"
asset_content_type: application/zip