-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (50 loc) · 1.68 KB
/
deploy.yml
File metadata and controls
61 lines (50 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build & Release RediCLI
on:
push:
branches:
- deployed # Runs when you push/merge to the `deployed` branch
workflow_dispatch: # Allows manual trigger from GitHub Actions UI
permissions:
contents: write # Required to create releases
jobs:
build:
name: Build RediCLI for Multiple Platforms
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.5' # Use your Go version
- name: Get Release Version
id: version
run: echo "VERSION=v${{ secrets.VERSION }}" >> $GITHUB_ENV
- name: Build for Linux (x86_64)
run: GOOS=linux GOARCH=amd64 go build -o redicli-linux
- name: Build for macOS (x86_64)
run: GOOS=darwin GOARCH=amd64 go build -o redicli-mac
- name: Build for macOS (Apple Silicon)
run: GOOS=darwin GOARCH=arm64 go build -o redicli-mac-arm64
- name: Build for Windows (x86_64)
run: GOOS=windows GOARCH=amd64 go build -o redicli.exe
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Binaries to Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}
files: |
redicli-linux
redicli-mac
redicli-mac-arm64
redicli.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}