-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 1.02 KB
/
make_mcpack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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