From f21f50facba3df8999712fe05e0d7145586aaeea Mon Sep 17 00:00:00 2001 From: Dexoron Date: Tue, 2 Jun 2026 01:27:04 +0800 Subject: [PATCH 1/3] feat: add support for publishing Snap packages with dynamic file resolution --- .github/workflows/release.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 62b0e02..c828a71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -738,6 +738,8 @@ jobs: - uses: dtolnay/rust-toolchain@stable - name: Publish to crates.io + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} run: cargo publish # ── Homebrew tap ─────────────────────────────────────────────────────────── @@ -833,10 +835,20 @@ jobs: name: snap-package path: dist-packages + - name: Resolve Snap File + id: snap-file + run: | + snap_file=$(ls dist-packages/*.snap 2>/dev/null | head -1) + if [ -z "$snap_file" ]; then + echo "No .snap file found in dist-packages/" + exit 1 + fi + echo "snap=$snap_file" >> "$GITHUB_OUTPUT" + - name: Publish to Snap Store uses: snapcore/action-publish@v1 env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }} with: - snap: dist-packages/*.snap + snap: ${{ steps.snap-file.outputs.snap }} release: stable \ No newline at end of file From 443306aa5f022b571ce1c7c9cc840e594106269c Mon Sep 17 00:00:00 2001 From: Dexoron Date: Tue, 2 Jun 2026 15:17:20 +0800 Subject: [PATCH 2/3] fix: update AUR publishing process to handle git initialization and improve build flags --- .github/workflows/release.yml | 59 +++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c828a71..c8b2dc8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -271,6 +271,8 @@ jobs: sha256sums=('${SHA256}') build() { cd "\$srcdir/\$pkgname-${PKGVER_ORIG}" + unset CFLAGS CXXFLAGS LDFLAGS + export RUSTFLAGS="-C linker=cc" cargo build --release --locked } package() { @@ -552,14 +554,13 @@ jobs: 'gcc: build C/C++ projects with GCC' 'clang: build C/C++ projects with Clang' ) - source=("\$pkgname-\$pkgver.tar.gz::\${SRC_URL}") + source=("\$pkgname-\$pkgver.tar.gz::${SRC_URL}") sha256sums=('${SHA256}') build() { cd "\$srcdir/\$pkgname-${PKGVER_ORIG}" - export CARGO_PROFILE_RELEASE_LTO=false - export RUSTFLAGS="\${RUSTFLAGS:-}" - export RUSTFLAGS="\${RUSTFLAGS/-C link-arg=-fuse-ld=lld/}" + unset CFLAGS CXXFLAGS LDFLAGS + export RUSTFLAGS="-C linker=cc" cargo build --release --locked } @@ -603,22 +604,31 @@ jobs: ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts export GIT_SSH_COMMAND='ssh -i ~/.ssh/aur -o IdentitiesOnly=yes' - git clone "ssh://aur@aur.archlinux.org/${AUR_PACKAGE}.git" aur-repo - cp packages/aur/dcr/PKGBUILD aur-repo/PKGBUILD - cp packages/aur/dcr/.SRCINFO aur-repo/.SRCINFO - + + mkdir -p aur-repo cd aur-repo + git init + git remote add origin "ssh://aur@aur.archlinux.org/${AUR_PACKAGE}.git" + + git fetch origin master || true + git checkout master || git checkout -b master + + cp ../packages/aur/dcr/PKGBUILD . + cp ../packages/aur/dcr/.SRCINFO . + git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - if git diff --quiet; then - echo "No AUR changes" - exit 0 + if git rev-parse --verify HEAD >/dev/null 2>&1; then + if git diff --quiet; then + echo "No AUR changes" + exit 0 + fi fi git add PKGBUILD .SRCINFO git commit -m "dcr ${{ needs.setup.outputs.version }}" - git push + git push -u origin master # ── Arch User Repository (dcr-bin) ──────────────────────────────── publish-aur-bin: @@ -703,22 +713,31 @@ jobs: ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts export GIT_SSH_COMMAND='ssh -i ~/.ssh/aur -o IdentitiesOnly=yes' - git clone "ssh://aur@aur.archlinux.org/${AUR_PACKAGE}.git" aur-repo - cp packages/aur/dcr-bin/PKGBUILD aur-repo/PKGBUILD - cp packages/aur/dcr-bin/.SRCINFO aur-repo/.SRCINFO - + + mkdir -p aur-repo cd aur-repo + git init + git remote add origin "ssh://aur@aur.archlinux.org/${AUR_PACKAGE}.git" + + git fetch origin master || true + git checkout master || git checkout -b master + + cp ../packages/aur/dcr-bin/PKGBUILD . + cp ../packages/aur/dcr-bin/.SRCINFO . + git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - if git diff --quiet; then - echo "No AUR changes" - exit 0 + if git rev-parse --verify HEAD >/dev/null 2>&1; then + if git diff --quiet; then + echo "No AUR changes" + exit 0 + fi fi git add PKGBUILD .SRCINFO git commit -m "dcr-bin ${{ needs.setup.outputs.version }}" - git push + git push -u origin master # ── crates.io ────────────────────────────────────────────────────────────── publish-crates: From 35f9b6be94dd32a36b2a257938e66268ea0b5c18 Mon Sep 17 00:00:00 2001 From: kie Date: Tue, 2 Jun 2026 11:27:09 +0300 Subject: [PATCH 3/3] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d313c82..1d5310c 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ cargo install dcr ```sh -curl -fsSL https://dcr.dexoron.su/install.sh | bash +curl -fsSL https://dcr.dexoron.su/install.sh | sh ``` @@ -116,7 +116,7 @@ curl -fsSL https://dcr.dexoron.su/install.sh | bash ```sh -curl -fsSL https://dcr.dexoron.su/install_bsd.sh | bash +curl -fsSL https://dcr.dexoron.su/install_bsd.sh | sh ``` @@ -259,4 +259,4 @@ cargo test GPL-3.0 — see [LICENSE](LICENSE)
Made with ❤️ by [Dexoron](https://github.com/dexoron) and contributors. - \ No newline at end of file +