Skip to content

Commit 28a7e40

Browse files
committed
ci: ?????
1 parent 29d1b6e commit 28a7e40

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,42 @@ jobs:
6363
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
6464
# Use a branch name where the formula resides, usually 'main'
6565
ref: master
66-
66+
- name: List Files
67+
run: ls -R
68+
- name: Create Formula if Missing
69+
run: |
70+
FORMULA_PATH="Formula/skidfuscator.rb"
71+
mkdir -p "$(dirname $FORMULA_PATH)"
72+
if [[ ! -f "$FORMULA_PATH" ]]; then
73+
echo "Creating formula file..."
74+
cat <<EOF > "$FORMULA_PATH"
75+
class Skidfuscator < Formula
76+
desc "A JVM-based obfuscation suite designed for Java and Android bytecode"
77+
homepage "https://github.com/skidfuscatordev/skidfuscator-java-obfuscator"
78+
url "PLACEHOLDER"
79+
sha256 "PLACEHOLDER"
80+
version "PLACEHOLDER"
81+
license "MIT"
82+
83+
def install
84+
libexec.install Dir["*.jar"]
85+
jar_name = Dir["#{libexec}/*.jar"].first
86+
(bin/"skidfuscator").write <<~EOS
87+
#!/usr/bin/env bash
88+
exec java -jar "#{jar_name}" "$@"
89+
EOS
90+
(bin/"skidfuscator").chmod 0755
91+
end
92+
93+
test do
94+
output = shell_output("#{bin}/skidfuscator --help", 0)
95+
assert_match "Usage", output
96+
end
97+
end
98+
EOF
99+
fi
100+
- name: Show Formula Contents
101+
run: cat Formula/skidfuscator.rb
67102
- name: Update formula
68103
run: |
69104
FORMULA_PATH="Formula/skidfuscator.rb"

0 commit comments

Comments
 (0)