Skip to content

Commit 3fe5ac1

Browse files
committed
ci: allow manual release dispatch and tag-only guard
1 parent 4642a08 commit 3fe5ac1

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
workflow_dispatch:
78

89
env:
910
CARGO_TERM_COLOR: always
1011

1112
jobs:
1213
release:
14+
if: startsWith(github.ref, 'refs/tags/v')
1315
name: Release ${{ matrix.target }}
1416
runs-on: ${{ matrix.os }}
1517
strategy:
@@ -83,6 +85,7 @@ jobs:
8385
retention-days: 30
8486

8587
create-release:
88+
if: startsWith(github.ref, 'refs/tags/v')
8689
name: Create Release
8790
needs: release
8891
runs-on: ubuntu-latest
@@ -134,23 +137,23 @@ jobs:
134137
git clone "https://x-access-token:${TAP_TOKEN}@github.com/ruphy/homebrew-sshdb" /tmp/tap
135138
136139
cat > /tmp/tap/Formula/sshdb.rb <<EOF
137-
class Sshdb < Formula
138-
desc "Keyboard-first SSH library and launcher TUI"
139-
homepage "https://github.com/ruphy/sshdb"
140-
url "${TAR_URL}"
141-
sha256 "${SHA256}"
142-
license "GPL-3.0-or-later"
143-
depends_on "rust" => :build
144-
145-
def install
146-
system "cargo", "install", *std_cargo_args
147-
end
148-
149-
test do
150-
system "#{bin}/sshdb", "--help"
151-
end
152-
end
153-
EOF
140+
class Sshdb < Formula
141+
desc "Keyboard-first SSH library and launcher TUI"
142+
homepage "https://github.com/ruphy/sshdb"
143+
url "${TAR_URL}"
144+
sha256 "${SHA256}"
145+
license "GPL-3.0-or-later"
146+
depends_on "rust" => :build
147+
148+
def install
149+
system "cargo", "install", *std_cargo_args
150+
end
151+
152+
test do
153+
system "#{bin}/sshdb", "--help"
154+
end
155+
end
156+
EOF
154157
155158
cd /tmp/tap
156159
git add Formula/sshdb.rb

0 commit comments

Comments
 (0)