skapa-season-3/.drone.yml
Steve McMaster 1c6e705fb7
All checks were successful
continuous-integration/drone/push Build is passing
Fix installer details
2024-07-11 23:51:34 +00:00

120 lines
3.3 KiB
YAML

kind: pipeline
name: default
type: docker
steps:
- name: prepare packwiz modpack
image: alpine/git
commands:
- mkdir dist
- git archive $DRONE_COMMIT | tar -C dist -x
- name: upload packwiz modpack
image: plugins/s3-sync
depends_on:
- prepare packwiz modpack
settings:
access_key:
from_secret: minio_access_key_id
secret_key:
from_secret: minio_secret_access_key
endpoint: https://s3.mcmaster.io
region: us-east-1
bucket: minecraft
path_style: true
source: "dist/"
target: "/${DRONE_REPO_NAME}"
- name: download NScurl
image: plugins/download
settings:
source: https://github.com/negrutiu/nsis-nscurl/releases/download/v1.2023.10.11/NScurl-1.2023.10.11.7z
destination: NScurl-1.2023.10.11.7z
- name: unzip NScurl
image: alpine:latest
depends_on:
- download NScurl
commands:
- apk add 7zip
- 7z x -oNScurl NScurl-1.2023.10.11.7z
- name: download Nsisunz
image: plugins/download
settings:
source: https://nsis.sourceforge.io/mediawiki/images/5/5a/NSISunzU.zip
destination: Nsisunz.zip
- name: unzip Nsisunz
image: alpine:latest
depends_on:
- download Nsisunz
commands:
- apk add unzip
- unzip Nsisunz.zip
- name: build installer
image: cr.smcm.xyz/drone-plugins/nsis
depends_on:
# - unzip graalvm
- unzip NScurl
- unzip Nsisunz
# - download packwiz installer
settings:
path: setup.nsi
# - name: download packwiz
# image: plugins/download
# settings:
# source: https://s3.mcmaster.io/minecraft/packwiz.zip
# destination: packwiz.zip
# - name: build mrpack
# image: alpine:latest
# depends_on:
# - download packwiz
# commands:
# - apk add unzip
# - unzip packwiz.zip
# - chmod +x packwiz
# - ./packwiz modrinth export -o $DRONE_REPO_NAME.mrpack
# - name: upload mrpack
# image: plugins/s3
# depends_on:
# - build mrpack
# settings:
# endpoint: https://s3.mcmaster.io
# bucket: minecraft
# region: us-east-1
# path_style: true
# access_key:
# from_secret: minio_access_key_id
# secret_key:
# from_secret: minio_secret_access_key
# source: "$DRONE_REPO_NAME.mrpack"
# target: "/minecraft/$DRONE_REPO_NAME"
- name: upload installer
image: plugins/s3
depends_on:
- build installer
settings:
endpoint: https://s3.mcmaster.io
bucket: minecraft
region: us-east-1
path_style: true
access_key:
from_secret: minio_access_key_id
secret_key:
from_secret: minio_secret_access_key
source: "${DRONE_REPO_NAME}-setup.exe"
target: "/${DRONE_REPO_NAME}"
# - name: post to discord
# image: appleboy/drone-discord
# depends_on:
# - "upload packwiz modpack"
# settings:
# webhook_id:
# from_secret: discord_id
# webhook_token:
# from_secret: discord_token
# message: "✅ New version of the modpack is here! Release info:\n{{commit.message}}\nDownload it here: https://s3.mcmaster.io/minecraft/${DRONE_REPO_NAME}/${DRONE_REPO_NAME}-setup.exe"
trigger:
branch:
- main
event:
- push
- custom
- cron