| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- kind: pipeline
- name: clone-build-release
-
- platform:
- os: linux
- arch: amd64
-
- # https://readme.drone.io/user-guide/pipeline/
- # https://docs.drone.io/reference/environ/
- # https://github.com/drone/drone
- steps:
- - name: build
- image: debian:stable-slim
- when:
- event: [ push, tag ]
- environment:
- MAKEFLAGS: -j 4
- BUILDDEPS: build-essential libc6-dev libhidapi-dev libssl-dev zip
- commands:
- - | # Use HTTP caching proxy for APT, avoid HTTPS pulls
- cat >> /etc/apt/apt.conf.d/01-proxy <<-EOF
- Acquire::http { Proxy "http://172.17.0.1:3142"; }
- Acquire::https { Proxy "https://"; };
- EOF
- - apt-get update && apt-get -y upgrade && apt-get -y install $BUILDDEPS
- - export MAKEFLAGS && make
- - RELEASE=${DRONE_REPO_NAME}-${DRONE_REPO_BRANCH}
- - test -n "${DRONE_TAG}" && RELEASE=$RELEASE-${DRONE_TAG}
- - mv dist $RELEASE
- - ls -la $RELEASE ; find $RELEASE -type f -exec md5sum '{}' \;
- - rm -rf release ; mkdir release
- - zip -rp release/$RELEASE.zip $RELEASE
- - tar -czvf release/$RELEASE.tar.gz $RELEASE
- - tar -cJvf release/$RELEASE.tar.xz $RELEASE
- - ls -la release ; find release -type f -exec md5sum '{}' \;
- - echo "BUILD FINISHED."
-
- # http://plugins.drone.io/drone-plugins/drone-gitea-release/
- # https://github.com/drone-plugins/drone-gitea-release
- - name: release
- image: plugins/gitea-release
- when:
- event: [ tag ]
- depends_on: [ build ]
- settings:
- title: ${DRONE_REPO_NAME}-${DRONE_REPO_BRANCH}-${DRONE_TAG} # file or string
- note: RELEASE.md # file or string
- draft: false
- prerelease: false
- base_url: https://git.unino.de
- insecure: false
- api_key:
- from_secret: gitea-release
- checksum: [ md5 ] # [ md5, sha1, sha256, sha512, adler32, crc32 ]
- file_exists: overwrite # overwrite, skip, fail
- files: # wildcard * matching files with prefix supported
- - release/*
|