Raxen/.drone.yml
2022-09-24 18:29:25 +02:00

77 lines
No EOL
1.8 KiB
YAML

kind: pipeline
type: exec
name: default
platform:
os: linux
arch: amd64
steps:
- name: restore-cache-with-filesystem
commands:
- ls -a /tmp/drone/Elixium/Raxen
- ls -a
- cp -r /tmp/drone/Elixium/Raxen $(pwd)/
- ls -a
# settings:
# restore: true
# mount:
# - ./build
# - ./.gradle
# ## Mount the cache volume, needs "Trusted"
# volumes:
# - name: cache
# path: /cache
- name: build
commands:
- ls -a
- gradle assemble --stacktrace
- ls -a
- name: gitea_release
when:
event:
- tag
commands:
- export PRERELEASE=true
- chmod +x git_release.sh
- python git_release.py --token "$API_KEY" --message "${DRONE_COMMIT_MESSAGE}" --prerelease $PRERELEASE --tag "${DRONE_TAG}"
environment:
API_KEY:
from_secret: api_key
# settings:
# base_url: https://git.unurled.me
# files: build/libs/*
# api_key:
# from_secret: api_key
# prerelease: true
# when:
# event: tag
- name: rebuild-cache-with-filesystem
commands:
- ls -a
- mkdir -p /tmp/drone/Elixium/Raxen
- ls -a /tmp/drone/Elixium/Raxen
- mv -f -t $(pwd)/build/classes /tmp/drone/Elixium/Raxen
- mv -f -t $(pwd)/build/generated /tmp/drone/Elixium/Raxen
- mv -f -t $(pwd)/build/resources /tmp/drone/Elixium/Raxen
- mv -f -t $(pwd)/build/tmp /tmp/drone/Elixium/Raxen
- mv -f -t $(pwd)/.gradle /tmp/drone/Elixium/Raxen
- ls -a
- ls -a /tmp/drone/Elixium/Raxen
# image: drillster/drone-volume-cache
# settings:
# rebuild: true
# mount:
# - ./build
# - ./.gradle
# # Mount the cache volume, needs "Trusted"
# volumes:
# - name: cache
# path: /cache
trigger:
event:
- push