Add rpm and deb builds
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Tyler 2021-03-27 00:54:08 -04:00
parent 68b03407e7
commit 92bd09a2c6
2 changed files with 26 additions and 0 deletions

View File

@ -21,6 +21,19 @@ steps:
environment:
API_KEY:
from_secret: api_key
- name: package
image: tystuyfzand/fpm
commands:
- chmod +x scripts/build-package.sh
- ARCH=i386 scripts/build-package.sh
- ARCH=amd64 scripts/build-package.sh
- ARCH=armv7 scripts/build-package.sh
- ARCH=arm64 scripts/build-package.sh
volumes:
- name: build
path: /build
when:
event: tag
- name: release
image: plugins/gitea-release
volumes:

13
scripts/build-package.sh Normal file
View File

@ -0,0 +1,13 @@
fpm -s dir -t deb -p /build/pastee_${DRONE_TAG}_${ARCH}.deb \
-n ow-api -v $DRONE_TAG -a $ARCH \
--deb-priority optional --force \
--deb-compression bzip2 \
--description "Paste.ee CLI Tool" \
-m "Paste.ee <admin@paste.ee>" --vendor "Paste.ee" \
-a $ARCH /build/pastee_linux_${ARCH}=/usr/bin/pastee
fpm -s dir -t rpm -p /build/pastee_${DRONE_TAG}_${ARCH}.rpm \
-n ow-api -v $DRONE_TAG -a $ARCH \
--description "Paste.ee CLI Tool" \
-m "Paste.ee <admin@paste.ee>" --vendor "Paste.ee" \
-a $ARCH /build/pastee_linux_${ARCH}=/usr/bin/pastee