Skip to content

Commit 4d6d705

Browse files
committed
权限问题
1 parent f4a9ad8 commit 4d6d705

1 file changed

Lines changed: 44 additions & 18 deletions

File tree

.github/workflows/release.yml

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -80,29 +80,18 @@ jobs:
8080
8181
# rpm
8282
cargo generate-rpm --target ${{ matrix.target_gnu }} -o dist/
83-
84-
# Arch pkg.tar.zst (in container)
85-
mkdir -p packaging/arch
86-
cp "$GUI_BIN" packaging/arch/fontsync
87-
PKGVER="${GITHUB_REF_NAME#v}"
88-
PKG_SHA256="$(sha256sum packaging/arch/fontsync | awk '{print $1}')"
89-
sed -e "s/__PKGVER__/${PKGVER}/" -e "s/__PKG_SHA256__/${PKG_SHA256}/" packaging/arch/PKGBUILD.in > packaging/arch/PKGBUILD
90-
docker run --rm -v "$PWD:/work" -w /work archlinux:latest bash -lc "\
91-
pacman -Sy --noconfirm base-devel zstd dbus pkgconf \
92-
libx11 libxext libxinerama libxcursor libxrender libxfixes libxft \
93-
fontconfig pango cairo glib2 musl patchelf desktop-file-utils \
94-
fakeroot fuse2 && \
95-
useradd -m build && \
96-
chown -R build:build /work && \
97-
su build -c 'cd packaging/arch && makepkg -f --nodeps --noconfirm' \
98-
"
99-
mv packaging/arch/*.pkg.tar.zst dist/
10083
10184
- name: Upload Artifacts (Linux)
10285
uses: actions/upload-artifact@v4
10386
with:
10487
name: linux-${{ matrix.arch }}
10588
path: dist/*
89+
90+
- name: Upload GUI Binary (Linux)
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: linux-gui-bin-${{ matrix.arch }}
94+
path: target/${{ matrix.target_gnu }}/release/fontsync
10695

10796
windows:
10897
runs-on: windows-latest
@@ -140,14 +129,51 @@ jobs:
140129

141130
publish:
142131
runs-on: ubuntu-latest
143-
needs: [linux, windows]
132+
needs: [linux, windows, archlinux]
144133
steps:
145134
- name: Download Artifacts
146135
uses: actions/download-artifact@v4
147136
with:
148137
path: dist
138+
merge-multiple: true
149139

150140
- name: Upload Release Assets
151141
uses: softprops/action-gh-release@v2
152142
with:
153143
files: dist/**/*
144+
145+
archlinux:
146+
runs-on: ubuntu-22.04
147+
container: archlinux:latest
148+
needs: linux
149+
steps:
150+
- name: Checkout
151+
uses: actions/checkout@v4
152+
153+
- name: Install system dependencies (Arch)
154+
run: |
155+
pacman -Sy --noconfirm base-devel zstd dbus pkgconf \
156+
libx11 libxext libxinerama libxcursor libxrender libxfixes libxft \
157+
fontconfig pango cairo glib2 musl patchelf desktop-file-utils \
158+
fakeroot fuse2
159+
160+
- name: Download GUI Binary (Linux)
161+
uses: actions/download-artifact@v4
162+
with:
163+
name: linux-gui-bin-amd64
164+
path: packaging/arch
165+
166+
- name: Package (Arch)
167+
shell: bash
168+
run: |
169+
PKGVER="${GITHUB_REF_NAME#v}"
170+
PKG_SHA256="$(sha256sum packaging/arch/fontsync | awk '{print $1}')"
171+
sed -e "s/__PKGVER__/${PKGVER}/" -e "s/__PKG_SHA256__/${PKG_SHA256}/" packaging/arch/PKGBUILD.in > packaging/arch/PKGBUILD
172+
cd packaging/arch
173+
makepkg -f --nodeps --noconfirm
174+
175+
- name: Upload Artifacts (Arch)
176+
uses: actions/upload-artifact@v4
177+
with:
178+
name: archlinux-x86_64
179+
path: packaging/arch/*.pkg.tar.zst

0 commit comments

Comments
 (0)