Skip to content

Commit 24333e9

Browse files
author
bram
committed
Added relesase debian and arach
1 parent 2276aae commit 24333e9

File tree

11 files changed

+458
-0
lines changed

11 files changed

+458
-0
lines changed

.github/workflows/release.yml

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-deb:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Install build dependencies
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y debhelper devscripts
22+
23+
- name: Update version in script
24+
run: |
25+
VERSION="${GITHUB_REF#refs/tags/v}"
26+
sed -i "s/^VERSION=\".*\"/VERSION=\"$VERSION\"/" sway-displays
27+
echo "VERSION=$VERSION" >> $GITHUB_ENV
28+
29+
- name: Update debian changelog
30+
run: |
31+
DATE=$(date -R)
32+
cat > debian/changelog << EOF
33+
sway-displays (${{ env.VERSION }}-1) unstable; urgency=medium
34+
35+
* Release ${{ env.VERSION }}
36+
37+
-- Bram <bram+sway@pescheck.io> $DATE
38+
EOF
39+
40+
- name: Build .deb package
41+
run: dpkg-buildpackage -us -uc -b
42+
43+
- name: Rename .deb with version
44+
run: |
45+
mv ../sway-displays_${{ env.VERSION }}-1_all.deb ../sway-displays_${{ env.VERSION }}_all.deb
46+
47+
- name: Generate checksums
48+
run: |
49+
sha256sum sway-displays > sway-displays.sha256
50+
sha256sum ../sway-displays_${{ env.VERSION }}_all.deb > ../sway-displays_${{ env.VERSION }}_all.deb.sha256
51+
52+
- name: Upload .deb artifact
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: deb-package
56+
path: |
57+
../sway-displays_*.deb
58+
../sway-displays_*.deb.sha256
59+
60+
- name: Upload script artifact
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: script-package
64+
path: |
65+
sway-displays
66+
sway-displays.sha256
67+
68+
create-release:
69+
needs: build-deb
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Checkout
73+
uses: actions/checkout@v4
74+
75+
- name: Get version
76+
run: |
77+
VERSION="${GITHUB_REF#refs/tags/v}"
78+
echo "VERSION=$VERSION" >> $GITHUB_ENV
79+
80+
- name: Download .deb artifact
81+
uses: actions/download-artifact@v4
82+
with:
83+
name: deb-package
84+
path: ./dist
85+
86+
- name: Download script artifact
87+
uses: actions/download-artifact@v4
88+
with:
89+
name: script-package
90+
path: ./dist
91+
92+
- name: Create install script artifact
93+
run: cp install.sh dist/
94+
95+
- name: Create Release
96+
uses: softprops/action-gh-release@v1
97+
with:
98+
name: v${{ env.VERSION }}
99+
files: |
100+
dist/*.deb
101+
dist/*.deb.sha256
102+
dist/sway-displays
103+
dist/sway-displays.sha256
104+
dist/install.sh
105+
generate_release_notes: true
106+
body: |
107+
## Installation
108+
109+
### Debian/Ubuntu
110+
```bash
111+
wget https://github.com/pescheckit/sway-displays/releases/download/v${{ env.VERSION }}/sway-displays_${{ env.VERSION }}_all.deb
112+
wget https://github.com/pescheckit/sway-displays/releases/download/v${{ env.VERSION }}/sway-displays_${{ env.VERSION }}_all.deb.sha256
113+
sha256sum -c sway-displays_${{ env.VERSION }}_all.deb.sha256
114+
sudo dpkg -i sway-displays_${{ env.VERSION }}_all.deb
115+
sudo apt-get install -f # Install dependencies if needed
116+
```
117+
118+
### Arch Linux (AUR)
119+
```bash
120+
yay -S sway-displays
121+
# or
122+
paru -S sway-displays
123+
```
124+
125+
### Manual Install (with verification)
126+
```bash
127+
curl -fsSL https://raw.githubusercontent.com/pescheckit/sway-displays/v${{ env.VERSION }}/install.sh | bash
128+
```
129+
130+
Or download and verify manually:
131+
```bash
132+
wget https://github.com/pescheckit/sway-displays/releases/download/v${{ env.VERSION }}/sway-displays
133+
wget https://github.com/pescheckit/sway-displays/releases/download/v${{ env.VERSION }}/sway-displays.sha256
134+
sha256sum -c sway-displays.sha256
135+
chmod +x sway-displays
136+
mv sway-displays ~/.local/bin/
137+
```
138+
env:
139+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140+
141+
update-aur:
142+
needs: create-release
143+
runs-on: ubuntu-latest
144+
if: ${{ secrets.AUR_SSH_KEY != '' }}
145+
steps:
146+
- name: Checkout
147+
uses: actions/checkout@v4
148+
149+
- name: Get version
150+
run: |
151+
VERSION="${GITHUB_REF#refs/tags/v}"
152+
echo "VERSION=$VERSION" >> $GITHUB_ENV
153+
154+
- name: Install makepkg
155+
run: |
156+
sudo apt-get update
157+
sudo apt-get install -y pacman-package-manager
158+
159+
- name: Update AUR package
160+
env:
161+
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
162+
run: |
163+
# Setup SSH
164+
mkdir -p ~/.ssh
165+
echo "$AUR_SSH_KEY" > ~/.ssh/aur
166+
chmod 600 ~/.ssh/aur
167+
cat >> ~/.ssh/config << EOF
168+
Host aur.archlinux.org
169+
IdentityFile ~/.ssh/aur
170+
User aur
171+
EOF
172+
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
173+
174+
# Clone AUR repo
175+
git clone ssh://aur@aur.archlinux.org/sway-displays.git aur-repo
176+
cd aur-repo
177+
178+
# Update PKGBUILD
179+
sed -i "s/^pkgver=.*/pkgver=${{ env.VERSION }}/" PKGBUILD
180+
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
181+
182+
# Update source URL
183+
sed -i "s|source=.*|source=(\"sway-displays-${{ env.VERSION }}.tar.gz::https://github.com/pescheckit/sway-displays/archive/refs/tags/v${{ env.VERSION }}.tar.gz\")|" PKGBUILD
184+
185+
# Generate .SRCINFO (simplified version without makepkg)
186+
cat > .SRCINFO << EOF
187+
pkgbase = sway-displays
188+
pkgdesc = Display manager for Sway window manager
189+
pkgver = ${{ env.VERSION }}
190+
pkgrel = 1
191+
url = https://github.com/pescheckit/sway-displays
192+
arch = any
193+
license = MIT
194+
depends = bash
195+
depends = jq
196+
depends = bc
197+
depends = sway
198+
optdepends = sway-mirror: for display mirroring support
199+
source = sway-displays-${{ env.VERSION }}.tar.gz::https://github.com/pescheckit/sway-displays/archive/refs/tags/v${{ env.VERSION }}.tar.gz
200+
sha256sums = SKIP
201+
202+
pkgname = sway-displays
203+
EOF
204+
205+
# Commit and push
206+
git config user.name "Pescheckit Bot"
207+
git config user.email "bram+sway@pescheck.io"
208+
git add PKGBUILD .SRCINFO
209+
git commit -m "Update to v${{ env.VERSION }}" || echo "No changes to commit"
210+
git push || echo "Push failed - may need to set up AUR package first"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Pescheckit
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

aur/.SRCINFO

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
pkgbase = sway-displays
2+
pkgdesc = Display manager for Sway window manager
3+
pkgver = 1.0.0
4+
pkgrel = 1
5+
url = https://github.com/pescheckit/sway-displays
6+
arch = any
7+
license = MIT
8+
depends = bash
9+
depends = jq
10+
depends = bc
11+
depends = sway
12+
optdepends = sway-mirror: for display mirroring support
13+
source = sway-displays-1.0.0.tar.gz::https://github.com/pescheckit/sway-displays/archive/refs/tags/v1.0.0.tar.gz
14+
sha256sums = SKIP
15+
16+
pkgname = sway-displays

aur/PKGBUILD

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Maintainer: Bram <bram+sway@pescheck.io>
2+
pkgname=sway-displays
3+
pkgver=1.0.0
4+
pkgrel=1
5+
pkgdesc="Display manager for Sway window manager"
6+
arch=('any')
7+
url="https://github.com/pescheckit/sway-displays"
8+
license=('MIT')
9+
depends=('bash' 'jq' 'bc' 'sway')
10+
optdepends=('sway-mirror: for display mirroring support')
11+
source=("$pkgname-$pkgver.tar.gz::https://github.com/pescheckit/sway-displays/archive/refs/tags/v$pkgver.tar.gz")
12+
sha256sums=('SKIP')
13+
14+
package() {
15+
cd "$srcdir/$pkgname-$pkgver"
16+
install -Dm755 sway-displays "$pkgdir/usr/bin/sway-displays"
17+
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
18+
}

debian/changelog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
sway-displays (1.0.0-1) unstable; urgency=medium
2+
3+
* Initial release
4+
* Display setup wizard
5+
* Profile save/load with hardware matching
6+
* Display mirroring support
7+
* Auto-detection and watch mode
8+
9+
-- Bram <bram+sway@pescheck.io> Tue, 17 Dec 2024 12:00:00 +0000

debian/control

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Source: sway-displays
2+
Section: utils
3+
Priority: optional
4+
Maintainer: Bram <bram+sway@pescheck.io>
5+
Build-Depends: debhelper-compat (= 13)
6+
Standards-Version: 4.6.0
7+
Homepage: https://github.com/pescheckit/sway-displays
8+
Vcs-Browser: https://github.com/pescheckit/sway-displays
9+
Vcs-Git: https://github.com/pescheckit/sway-displays.git
10+
Rules-Requires-Root: no
11+
12+
Package: sway-displays
13+
Architecture: all
14+
Depends: ${misc:Depends}, bash, jq, bc, sway
15+
Recommends: git
16+
Suggests: sway-mirror
17+
Description: Display manager for Sway window manager
18+
A command-line tool for managing displays in Sway, including:
19+
- Interactive setup wizard for display configuration
20+
- Profile saving and loading with hardware detection
21+
- Display mirroring support via sway-mirror
22+
- Auto-detection of display configurations
23+
- Watch mode for automatic profile switching

debian/copyright

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: sway-displays
3+
Upstream-Contact: Bram <bram+sway@pescheck.io>
4+
Source: https://github.com/pescheckit/sway-displays
5+
6+
Files: *
7+
Copyright: 2024 Pescheckit
8+
License: MIT
9+
10+
License: MIT
11+
Permission is hereby granted, free of charge, to any person obtaining a copy
12+
of this software and associated documentation files (the "Software"), to deal
13+
in the Software without restriction, including without limitation the rights
14+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15+
copies of the Software, and to permit persons to whom the Software is
16+
furnished to do so, subject to the following conditions:
17+
.
18+
The above copyright notice and this permission notice shall be included in all
19+
copies or substantial portions of the Software.
20+
.
21+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27+
SOFTWARE.

debian/install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sway-displays usr/bin

debian/rules

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/make -f
2+
3+
%:
4+
dh $@
5+
6+
override_dh_auto_install:
7+
install -D -m 755 sway-displays $(DESTDIR)/usr/bin/sway-displays

debian/source/format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (native)

0 commit comments

Comments
 (0)