--- kind: "pipeline" type: "docker" name: "Create Release from tag" trigger: event: - "tag" volumes: - name: "tmp" temp: {} - name: "server" temp: {} - name: "client" temp: {} - name: "curse" temp: {} steps: - name: "Run build tool" image: "gitea.marquis.site/operations/modpack_buildah" settings: modpack__version: "${DRONE_TAG}" curseforge_apikey: from_secret: "curseforge_apikey" volumes: - name: "server" path: "/out/server" - name: "client" path: "/out/client" - name: "curse" path: "/out/curse" - name: "tmp" path: "/tmp/modpack_buildah" - name: "Build and push server container image" image: "plugins/docker" privileged: true settings: dockerfile: "/out/server/Dockerfile" context: "/out/server" registry: "gitea.marquis.site" repo: "gitea.marquis.site/minecraft/atm8" username: "drone-ci" password: from_secret: "gitea_registry_password" tags: - "${DRONE_COMMIT_SHA:0:8}" - "latest" - "${DRONE_TAG}" volumes: - name: "server" path: "/out/server" - name: "Update client files in repository" image: "alpine/git" commands: - "git fetch origin +refs/heads/master" - "git checkout master" - "rm -rf ./minecraft/mods" - "cp -r /out/client/* ." volumes: - name: "client" path: "/out/client" - name: "Push new client version to repository" image: "appleboy/drone-git-push" settings: branch: "master" remote_name: "origin" author_name: "${DRONE_COMMIT_AUTHOR_NAME}" commit: true commit_message: "Version ${DRONE_TAG}" - name: "Create Gitea Release for Curse Modpack" image: "plugins/gitea-release" settings: base_url: "https://gitea.marquis.site" title: "Version ${DRONE_TAG}" files: "/out/curse/*-${DRONE_TAG}.zip" api_key: from_secret: "gitea_registry_password" note: > Modpack Server container image: `gitea.marquis.site/minecraft/atm8:${DRONE_TAG}` volumes: - name: "curse" path: "/out/curse" # - name: Send notification # image: appleboy/drone-telegram # environment: # DRONE_TELEGRAM_TOKEN: # from_secret: DRONE_TELEGRAM_TOKEN # settings: # token: 1942328463:AAHgHqwVFEluElKynjVfJpPPY9Hhs52LHKk # to: -372192466 # message: > # 🤖 Build from {{datetime build.started "02-Jan-2006 15:04:05 CET" "Europe/Berlin" }} has finished # Repository: {{repo.name}} \[{{commit.branch}}] ({{since build.started}}) # {{#success build.status}} # ✅ build {{build.number}} succeeded. Good job. # {{else}} # ❌ build {{build.number}} failed. Fix me please. # Repository url: {{commit.link}} # Build results: {{build.link}} # {{/success}} # when: # status: # - success # - failure