Skip to content

Commit 43a37f1

Browse files
Prepare environment for nfpm (#19)
* fix(build): Prepare environment for nfpm * fix(build): Prepare environment for nfpm
1 parent cda45fe commit 43a37f1

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,26 @@ jobs:
5050
with:
5151
path: .
5252

53+
- name: Prepare environment for nfpm
54+
run: |
55+
mkdir -p ./dist
56+
for arch in arm64 amd64; do
57+
if [ -d "./alpinezen-wallpaper-linux-$arch" ]; then
58+
# Extract the tar.gz into the directory for nfpm to access
59+
mkdir -p ./dist/linux-$arch
60+
tar -xzf ./alpinezen-wallpaper-linux-$arch.tar.gz/alpinezen-wallpaper-linux-$arch.tar.gz -C ./dist/linux-$arch
61+
fi
62+
done
63+
# Replace version in nfpm.yaml
64+
sed -i "s/version: \".*\"/version: \"${{ env.VERSION }}\"/" assets/linux/nfpm.yaml
65+
5366
- name: Create Linux deb
5467
uses: burningalchemist/action-gh-nfpm@v1
5568
if: matrix.os == 'linux'
5669
with:
5770
packager: deb
5871
config: assets/linux/nfpm.yaml
5972
target: alpinezen-wallpaper-${{ matrix.os }}-${{ matrix.arch }}.deb
60-
version: ${{ env.VERSION }}
6173

6274
- name: Create Linux rpm
6375
uses: burningalchemist/action-gh-nfpm@v1
@@ -66,7 +78,6 @@ jobs:
6678
packager: rpm
6779
config: assets/linux/nfpm.yaml
6880
target: alpinezen-wallpaper-${{ matrix.os }}-${{ matrix.arch }}.rpm
69-
version: ${{ env.VERSION }}
7081

7182
- name: Rename artifacts with version and build number
7283
run: |

assets/linux/nfpm.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
88

99
name: "alpinezen-wallpaper"
10-
arch: "{{ .Arch }}"
10+
arch: "amd64"
1111
platform: "linux"
12-
version: "{{ .Version }}"
12+
version: "1.0.0"
1313
#section: "default"
1414
#priority: "extra"
1515
suggests:
@@ -21,9 +21,9 @@ vendor: "Tilmann Griesel"
2121
homepage: "https://alpinezen.club"
2222
license: "GPL"
2323
contents:
24-
- src: ./alpinezen-wallpaper-linux-{{ .Arch }}/alpinezen-wallpaper-cli-linux-{{ .Arch }}
24+
- src: ./dist/linux-amd64/alpinezen-wallpaper-cli-linux-amd64
2525
dst: /usr/bin/alpinezen-wallpaper-cli
26-
- src: ./alpinezen-wallpaper-linux-{{ .Arch }}/alpinezen-wallpaper-ui-linux-{{ .Arch }}
26+
- src: ./dist/linux-amd64/alpinezen-wallpaper-ui-linux-amd64
2727
dst: /usr/bin/alpinezen-wallpaper-ui
2828
- src: ./assets/linux/alpinezen.service
2929
dst: /usr/lib/systemd/user/alpinezen.service

0 commit comments

Comments
 (0)