Skip to content

Commit

Permalink
Merge branch 'master' into feature/tag-torrents
Browse files Browse the repository at this point in the history
  • Loading branch information
ludviglundgren authored Aug 19, 2024
2 parents a2c57bf + 4631210 commit 6aa5a5f
Show file tree
Hide file tree
Showing 49 changed files with 4,038 additions and 2,068 deletions.
72 changes: 66 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,87 @@
name: goreleaser

on:
pull_request:
push:
branches:
- "master"
- "develop"
tags:
- '*'
- 'v*'

jobs:
goreleaser:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
cache: true

- name: Test
run: go test -v ./...

build:
name: Build Go binaries
needs: [ test ]
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
cache: true

- name: Run GoReleaser build
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean --skip=validate --skip=publish --parallelism 5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload assets
uses: actions/upload-artifact@v4
with:
name: qbittorrent-cli
path: |
dist/*.tar.gz
dist/*.zip
release:
name: Build and publish binaries
needs: [ test ]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.17
go-version: 1.22
cache: true
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/test.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
.qbt.toml
.devcontainer
dist
bin
bin
testdata
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

env:
- GO111MODULE=on

Expand Down
23 changes: 19 additions & 4 deletions .qbt.toml.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[qbittorrent]
host = "127.0.0.1" # qbittorrent webui-api hostname/ip
port = 6776 # qbittorrent webui-api port
login = "user" # qbittorrent webui-api user
password = "password" # qbittorrent webui-api password
addr = "http://127.0.0.1:6776" # qbittorrent webui-api hostname/ip
login = "user" # qbittorrent webui-api user (optional)
password = "password" # qbittorrent webui-api password (optional)
#basicUser = "user" # qbittorrent webui-api basic auth user (optional)
#basicPass = "password" # qbittorrent webui-api basic auth password (optional)

# some trackers are bugged and need to reannounce before torrent can start
[reannounce]
Expand All @@ -13,3 +14,17 @@ interval = 7000 # interval between attempts in milliseconds
[rules]
enabled = true # enable or disable rules
max_active_downloads = 2 # set max active downloads

[[compare]]
addr = "http://100.100.100.100:6776"
login = "user"
password = "password"
#basicUser = "user"
#basicPass = "password"

[[compare]] # you can specify multiple compare blocks
addr = "http://100.100.100.101:6776"
login = "user"
password = "password"
#basicUser = "user"
#basicPass = "password"
Loading

0 comments on commit 6aa5a5f

Please sign in to comment.