Skip to content

Commit b0cc09d

Browse files
committed
Add .drone.yml
1 parent 4b94ee5 commit b0cc09d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.drone.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
pipeline:
2+
build:
3+
image: debian:stretch
4+
commands:
5+
- dpkg-deb --build . ./
6+
7+
deploy:
8+
image: debian:stretch
9+
commands:
10+
- "export NAME=$(ls -1 plexmediaserver-installer_*.deb)"
11+
- "export VERSION=$(dpkg -I plexmediaserver-installer_*.deb | grep Version: | awk '{print $2}')"
12+
- "export GITHUB_USER=$DRONE_REPO_OWNER"
13+
- "export GITHUB_REPO=$DRONE_REPO_NAME"
14+
- apt-get update -y -qqq
15+
- apt-get install -y -qqq wget bzip2
16+
- wget -c https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2
17+
- tar -C /tmp -jxf linux-amd64-github-release.tar.bz2
18+
- mv /tmp/bin/linux/amd64/github-release /usr/local/bin/
19+
- 'github-release release --tag "$VERSION" --name "$VERSION: $NAME" --description "$VERSION" --draft || true'
20+
- 'github-release upload --tag "$VERSION" --name "$NAME" --file "$NAME"'
21+
- 'github-release edit --tag "$VERSION" --name "$VERSION: $NAME" --description "$VERSION"'
22+
environment:
23+
- GITHUB_TOKEN=${GITHUB_TOKEN}
24+
when:
25+
branch: master

0 commit comments

Comments
 (0)