aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarvey Tindall <hrfee@protonmail.ch>2021-05-24 20:27:45 +0100
committerHarvey Tindall <hrfee@protonmail.ch>2021-05-24 20:27:45 +0100
commit22ad0e29cb61a7d32bccf301b87b80b51b84d125 (patch)
treeba2ff67f2742bfb2b0c8a07ef3dddb5b828c4aa3
parent8340ef1f20f522095e58332fa0724ef049f73ba8 (diff)
downloadwaybar-mpris-22ad0e29cb61a7d32bccf301b87b80b51b84d125.tar.gz
waybar-mpris-22ad0e29cb61a7d32bccf301b87b80b51b84d125.zip
make debs/rpms, upload .debs to repo
-rw-r--r--.drone.yml11
-rw-r--r--.goreleaser.yml28
2 files changed, 35 insertions, 4 deletions
diff --git a/.drone.yml b/.drone.yml
index 9875891..f18be0d 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -5,6 +5,9 @@ type: docker
steps:
- name: build
image: golang:latest
+ volumes:
+ - name: ssh_key
+ path: /id_rsa
commands:
- apt update -y
- apt install -y python3-pip curl
@@ -14,11 +17,17 @@ steps:
- ./goreleaser.sh --snapshot --skip-publish --rm-dist
- wget https://builds.hrfee.pw/upload.py
- pip3 install requests
- - bash -c 'python3 upload.py https://builds2.hrfee.pw hrfee waybar-mpris --upload ./dist/*.tar.gz'
+ - bash -c 'sftp -P 2022 -i /id_rsa -o StrictHostKeyChecking=no root@161.97.102.153:/repo/incoming <<< $"put dist/*.deb"'
+ - bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "repo-process-deb trusty-unstable"'
+ - bash -c 'python3 upload.py https://builds2.hrfee.pw hrfee waybar-mpris --upload ./dist/*.tar.gz ./dist/*.rpm'
environment:
BUILDRONE_KEY:
from_secret: BUILDRONE_KEY
+volumes:
+ - name: ssh_key
+ host:
+ path: /root/.ssh/id_rsa_packaging
trigger:
branch:
- main
diff --git a/.goreleaser.yml b/.goreleaser.yml
index 01096fa..3f599b0 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -8,7 +8,8 @@ before:
hooks:
- go mod download
builds:
- - dir: ./
+ - id: main
+ dir: ./
env:
- CGO_ENABLED=0
goos:
@@ -18,16 +19,37 @@ builds:
- arm
- arm64
archives:
- - replacements:
+ - id: main
+ builds:
+ - main
+ replacements:
linux: Linux
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
- name_template: "git-{{.ShortCommit}}"
+ name_template: "0.0.0-{{.ShortCommit}}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
+nfpms:
+ - id: main
+ file_name_template: '{{ .ProjectName }}-git-{{ .ShortCommit }}_{{ .Arch }}'
+ package_name: waybar-mpris
+ homepage: https://git.hrfee.pw/hrfee/waybar-mpris
+ description: MPRIS2 waybar component
+ maintainer: Harvey Tindall <hrfee@hrfee.dev>
+ license: MIT
+ vendor: hrfee.dev
+ version_metadata: git
+ builds:
+ - main
+ content:
+ - src: ./LICENSE
+ dst: /usr/share/licenses/waybar-mpris
+ formats:
+ - deb
+ - rpm