-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (68 loc) · 2.23 KB
/
release.yml
File metadata and controls
83 lines (68 loc) · 2.23 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Get version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build binaries
env:
CGO_ENABLED: 0
run: |
VERSION=${{ steps.version.outputs.VERSION }}
LDFLAGS="-s -w -X github.com/two-tech-dev/endgit-cli/cmd.Version=${VERSION}"
GOOS=windows GOARCH=amd64 go build -ldflags="${LDFLAGS}" -o endgit-windows-amd64.exe .
GOOS=linux GOARCH=amd64 go build -ldflags="${LDFLAGS}" -o endgit-linux-amd64 .
GOOS=darwin GOARCH=amd64 go build -ldflags="${LDFLAGS}" -o endgit-darwin-amd64 .
GOOS=darwin GOARCH=arm64 go build -ldflags="${LDFLAGS}" -o endgit-darwin-arm64 .
- name: Generate checksums
run: |
sha256sum endgit-* > checksums.txt
cat checksums.txt
- name: Create Release
uses: softprops/action-gh-release@v3
with:
files: |
endgit-windows-amd64.exe
endgit-linux-amd64
endgit-darwin-amd64
endgit-darwin-arm64
checksums.txt
body: |
## EndGit ${{ steps.version.outputs.VERSION }}
### Installation
**Windows:**
```powershell
irm https://endgit.dev/installer.ps1 | iex
```
**Linux / macOS:**
```bash
curl -sSL https://endgit.dev/installer.sh | bash
```
### Usage
```
endgit login
endgit search <plugin>
endgit install <plugin>
endgit info <plugin>
```
### Checksums
See `checksums.txt` for SHA-256 verification.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}