Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 113 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,26 @@ on:

jobs:
release:
runs-on: windows-latest
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: windows
goarch: amd64
extension: .exe
os_name: windows-amd64
- goos: darwin
goarch: amd64
extension: ""
os_name: macos-intel
- goos: darwin
goarch: arm64
extension: ""
os_name: macos-arm64
- goos: linux
goarch: amd64
extension: ""
os_name: linux-amd64

steps:
- name: Checkout code
Expand All @@ -25,10 +44,13 @@ jobs:
cd cmd/qpn
go mod tidy

- name: Build for Windows
- name: Build for ${{ matrix.os_name }}
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
cd cmd/qpn
go build -o qpn.exe
go build -o qpn-${{ matrix.os_name }}${{ matrix.extension }}

- name: Get contributors since last release
id: contributors
Expand All @@ -47,16 +69,53 @@ jobs:

- name: Create Release Archive
run: |
mkdir release
copy cmd\qpn\qpn.exe release\
copy config.yaml.dist release\
copy create_autostart_windows_task.bat release\
copy README.md release\
mkdir release-${{ matrix.os_name }}
cp cmd/qpn/qpn-${{ matrix.os_name }}${{ matrix.extension }} release-${{ matrix.os_name }}/
cp cmd/qpn/config.yaml release-${{ matrix.os_name }}/config.yaml.dist
cp cmd/qpn/README.md release-${{ matrix.os_name }}/

- name: Archive Release
run: |
Compress-Archive -Path release\* -DestinationPath queue-pop-notification-${{ github.ref_name }}.zip
if [ "${{ matrix.goos }}" = "windows" ]; then
cd release-${{ matrix.os_name }} && zip -r ../queue-pop-notification-${{ matrix.os_name }}-${{ github.ref_name }}.zip .
else
tar -czf queue-pop-notification-${{ matrix.os_name }}-${{ github.ref_name }}.tar.gz -C release-${{ matrix.os_name }} .
fi
- name: Upload Release Assets
uses: actions/upload-artifact@v3
with:
name: queue-pop-notification-${{ matrix.os_name }}-${{ github.ref_name }}
path: |
queue-pop-notification-${{ matrix.os_name }}-${{ github.ref_name }}.zip
queue-pop-notification-${{ matrix.os_name }}-${{ github.ref_name }}.tar.gz

create-release:
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get contributors since last release
id: contributors
run: |
# Get the previous tag
previousTag=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -n "$previousTag" ]; then
contributors=$(git log --pretty=format:"%an" $previousTag..HEAD | sort | uniq)
else
contributors=$(git log --pretty=format:"%an" | sort | uniq)
fi
contributorList=$(echo "$contributors" | sed 's/^/- @/' | tr '\n' '\n')
echo "contributors<<EOF" >> $GITHUB_OUTPUT
echo "$contributorList" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Download all artifacts
uses: actions/download-artifact@v3

- name: Create Release
uses: actions/create-release@v1
id: create_release
Expand All @@ -68,16 +127,22 @@ jobs:
body: |
## Queue Pop Notification ${{ github.ref_name }}

### Downloads available for:
- **Windows**: `queue-pop-notification-windows-amd64-${{ github.ref_name }}.zip`
- **macOS Intel**: `queue-pop-notification-macos-intel-${{ github.ref_name }}.tar.gz`
- **macOS Apple Silicon**: `queue-pop-notification-macos-arm64-${{ github.ref_name }}.tar.gz`
- **Linux**: `queue-pop-notification-linux-amd64-${{ github.ref_name }}.tar.gz`

### What's included:
- `qpn.exe` - The main executable
- Main executable (`qpn.exe` for Windows, `qpn-macos-intel`/`qpn-macos-arm64`/`qpn-linux-amd64` for Unix)
- `config.yaml.dist` - Configuration file template
- `create_autostart_windows_task.bat` - Script to set up Windows autostart
- `README.md` - Documentation

### Installation:
1. Download and extract the zip file
2. Rename `config.yaml.dist` to `config.yaml` and edit it with your Discord webhook URL and WoW path
3. Run `create_autostart_windows_task.bat` as Administrator to set up autostart
1. Download the appropriate file for your operating system
2. Extract the archive
3. Rename `config.yaml.dist` to `config.yaml` and edit it with your Discord webhook URL and WoW path
4. Start the application by running `qpn.exe` (Windows) or `./qpn-macos-intel`/`./qpn-macos-arm64`/`./qpn-linux-amd64` (Unix)

### Requirements:
- World of Warcraft with QueueNotify addon installed
Expand All @@ -86,17 +151,45 @@ jobs:
${{ steps.contributors.outputs.contributors }}

Thank you to all contributors who made this release possible! 🎉


draft: false
prerelease: false

- name: Upload Release Asset
- name: Upload Windows Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./queue-pop-notification-windows-amd64-${{ github.ref_name }}/queue-pop-notification-windows-amd64-${{ github.ref_name }}.zip
asset_name: queue-pop-notification-windows-amd64-${{ github.ref_name }}.zip
asset_content_type: application/zip

- name: Upload macOS Intel Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./queue-pop-notification-macos-intel-${{ github.ref_name }}/queue-pop-notification-macos-intel-${{ github.ref_name }}.tar.gz
asset_name: queue-pop-notification-macos-intel-${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip

- name: Upload macOS ARM64 Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./queue-pop-notification-macos-arm64-${{ github.ref_name }}/queue-pop-notification-macos-arm64-${{ github.ref_name }}.tar.gz
asset_name: queue-pop-notification-macos-arm64-${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip

- name: Upload Linux Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./queue-pop-notification-${{ github.ref_name }}.zip
asset_name: queue-pop-notification-${{ github.ref_name }}.zip
asset_content_type: application/zip
asset_path: ./queue-pop-notification-linux-amd64-${{ github.ref_name }}/queue-pop-notification-linux-amd64-${{ github.ref_name }}.tar.gz
asset_name: queue-pop-notification-linux-amd64-${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
Tired of being tethered to your desk with a wired headset while waiting for a World of Warcraft match? This lightweight application sends a Discord notification the moment your queue pops, so you'll never miss a match again!

As of right now due to the restrictions from the QueueNotify addon you only get notifications for Solo-Shuffle and BG Blitz.
---
I'll probably create a new addon to also receive notifications for 2v2 and 3v3 + some extras like Rating etc.

## Features

- [x] notifications for Solo-Shuffle and BG Blitz
- [ ] companion addon which provides further ingame information like rating, 2v2 and 3v3 notifications
- [ ] 2v2 and 3v3 notifications
- [ ] rating information

## Prerequisites

Expand Down Expand Up @@ -49,20 +53,21 @@ go build .
```
This will create the `qpn.exe` executable.

### Run Manually
To run the application directly, execute the compiled file from your terminal:
```sh
./qpn.exe
```
or just click the executable.
### Start the app
You have two options. Click on the executable which assumes you have a `config.yaml` in the same directory.

### Run Automatically on Startup (Windows)
A batch script is provided to create a Windows Scheduled Task that runs the application automatically when you log in.
Alternatively run start the app manually by executing the compiled file from your terminal:
```
# windows
qpn.exe

1. Place the `create_autostart_windows_task.bat` script in the same directory as `qpn.exe`.
2. Right-click `create_autostart_windows_task.bat` and select **"Run as administrator"**.
# macos
./qpn-macos-intel
./qpn-macos-arm64

The script will handle the rest.
# linux
./qpn-linux-amd64
```

## Alternatives
* [Queue Notify Client](https://github.com/rudikiaz/queue-notify-client)
Expand Down
6 changes: 3 additions & 3 deletions cmd/qpn/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"os"
"os/signal"
"path/filepath"
"solo-queue-pop/internal/config"
"solo-queue-pop/internal/discord"
"solo-queue-pop/internal/watcher"
"queue-pop-notification/internal/config"
"queue-pop-notification/internal/discord"
"queue-pop-notification/internal/watcher"
"syscall"

"github.com/spf13/cobra"
Expand Down
46 changes: 0 additions & 46 deletions create_autostart_windows_task.bat

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module solo-queue-pop
module queue-pop-notification

go 1.24.5

Expand Down
Loading