5656 run : go test -race ./...
5757
5858 # goreleaser v2 requires private_key to be a FILE PATH, not inline content.
59- # This step writes the secret to a temp file and exposes its path .
60- # If AUR_KEY is absent the AUR publisher is skipped via --skip=aurs.
59+ # Writes the secret to ~/.ssh/aur_key and sets has_key=true/false .
60+ # If AUR_KEY is absent, the AUR publisher is skipped via --skip=aurs.
6161 - name : Setup AUR key
6262 id : aur
6363 env :
6767 mkdir -p ~/.ssh
6868 echo "$AUR_KEY_CONTENT" > ~/.ssh/aur_key
6969 chmod 600 ~/.ssh/aur_key
70- echo "key_path=$HOME/.ssh/aur_key" >> "$GITHUB_OUTPUT"
71- echo "goreleaser_args=release --clean" >> "$GITHUB_OUTPUT"
70+ echo "has_key=true" >> "$GITHUB_OUTPUT"
7271 else
73- echo "key_path=" >> "$GITHUB_OUTPUT"
74- echo "goreleaser_args=release --clean --skip=aurs" >> "$GITHUB_OUTPUT"
72+ echo "has_key=false" >> "$GITHUB_OUTPUT"
7573 echo "::warning title=AUR_KEY ausente::Publicação no AUR ignorada. Configure o secret AUR_KEY para habilitar."
7674 fi
7775
@@ -80,14 +78,14 @@ jobs:
8078 with :
8179 distribution : goreleaser
8280 version : " ~> v2"
83- args : ${{ steps.aur.outputs.goreleaser_args }}
81+ args : >-
82+ release --clean
83+ ${{ steps.aur.outputs.has_key != 'true' && '--skip=aurs' || '' }}
8484 env :
85- # GitHub token to create the release and upload assets.
86- # GITHUB_TOKEN is automatically injected by Actions — no extra configuration needed.
8785 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
88- # Path to the SSH private key file written by the "Setup AUR key" step above .
89- # goreleaser v2 requires a file path here, not inline key content .
90- AUR_KEY : ${{ steps.aur.outputs.key_path }}
86+ # goreleaser v2 expects a file path for private_key, not inline key content .
87+ # Points to the file written by the "Setup AUR key" step above .
88+ AUR_KEY : /home/runner/.ssh/aur_key
9189
9290 # ── Completion notification ───────────────────────────────────────────────────
9391 notify :
0 commit comments