Skip to content

Commit 7114d98

Browse files
committed
CI: extract refs/tag for homebrew
1 parent 9e74226 commit 7114d98

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/ci.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -579,14 +579,24 @@ jobs:
579579
mv debian-x86_64.deb ../files/martin-Debian-x86_64.deb
580580
cd ..
581581
582+
- name: Publish
583+
if: startsWith(github.ref, 'refs/tags/v')
584+
run: |
585+
set -x
586+
587+
# Extract Github release version only without the "v" prefix
588+
MARTIN_VERSION=$(echo "${{ github.ref }}" | sed -e 's/refs\/tags\/v//')
589+
590+
cd target
582591
mkdir homebrew
592+
583593
cat << EOF > homebrew_config.yaml
584-
version: "${{ github.ref }}"
594+
version: "$MARTIN_VERSION"
585595
macos_arm_sha256: "$(shasum -a 256 files/martin-Darwin-aarch64.tar.gz | cut -d' ' -f1)"
586596
macos_intel_sha256: "$(shasum -a 256 files/martin-Darwin-x86_64.tar.gz | cut -d' ' -f1)"
587597
linux_arm_sha256: "$(shasum -a 256 files/martin-Linux-aarch64-musl.tar.gz | cut -d' ' -f1)"
588598
linux_intel_sha256: "$(shasum -a 256 files/martin-Linux-x86_64-musl.tar.gz | cut -d' ' -f1)"
589-
EOF
599+
EOF
590600
591601
- name: Publish
592602
if: startsWith(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)