| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- 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
- - CONTENT=${DRONE_REPO_NAME}
- - RELEASE=${DRONE_REPO_NAME}-bin
- - test -n "${DRONE_TAG}" && RELEASE=$RELEASE-${DRONE_TAG}
- - mv dist $CONTENT
- - ls -la $CONTENT ; find $CONTENT -type f -exec md5sum '{}' \;
- - zip -rp $RELEASE.zip $CONTENT
- - tar -czvf $RELEASE.tar.gz $CONTENT
- - tar -cJvf $RELEASE.tar.xz $CONTENT
- - rm -rf $CONTENT
- - for F in *.zip *.gz *.xz *.deb *.dsc ; do ls -l $F ; md5sum $F ; done
- - 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
- - ./*.zip
- - ./*.gz
- - ./*.xz
- - ./*.deb
- - ./*.dsc
|