aboutsummaryrefslogtreecommitdiff
path: root/.drone.yml
blob: 920577b956e56930e2629368e4779480dda71c91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: waybar-mpris
kind: pipeline
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
        - go mod download
        - curl -sL https://git.io/goreleaser > goreleaser.sh
        - chmod +x goreleaser.sh
        - ./version.sh ./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 ./dist/*.rpm'
        - 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"'
      environment:
          BUILDRONE_KEY:
              from_secret: BUILDRONE_KEY

volumes:
    - name: ssh_key
      host:
          path: /root/.ssh/id_rsa_packaging
trigger:
    branch:
        - main
    event:
        exclude:
            - pull_request