mirror of
https://github.com/Gouryella/drip.git
synced 2026-02-23 21:00:44 +00:00
feat(install-scripts): Updated installation scripts to fetch the latest version from GitHub and fixed download links.
Updated client and server installation scripts to automatically fetch the latest release via the GitHub API and corrected binary download addresses. Removed the old "latest" version logic to ensure explicit version tags are always used for downloads. fix(readme): Fixed installation commands and license information in the README. Corrected the installation script link pointing to an incorrect URL in the README to the correct path raw.githubusercontent.com, and updated the open-source license information used by the project from MIT to BSD 3-Clause. ci(release): Added an automated GitHub Actions release workflow. Added a new CI workflow configuration file to trigger the build process when a tag is pushed. This workflow compiles binaries for multiple platforms, generates checksums, and creates a GitHub Release with attachments. Supports different architectures including Linux, macOS, and Windows.
This commit is contained in:
70
.github/workflows/release.yml
vendored
Normal file
70
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
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@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build for all platforms
|
||||
run: |
|
||||
# Linux amd64
|
||||
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o drip-${{ steps.version.outputs.VERSION }}-linux-amd64 ./cmd/drip
|
||||
|
||||
# Linux arm64
|
||||
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o drip-${{ steps.version.outputs.VERSION }}-linux-arm64 ./cmd/drip
|
||||
|
||||
# macOS amd64
|
||||
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o drip-${{ steps.version.outputs.VERSION }}-darwin-amd64 ./cmd/drip
|
||||
|
||||
# macOS arm64
|
||||
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o drip-${{ steps.version.outputs.VERSION }}-darwin-arm64 ./cmd/drip
|
||||
|
||||
# Windows amd64
|
||||
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o drip-${{ steps.version.outputs.VERSION }}-windows-amd64.exe ./cmd/drip
|
||||
|
||||
# Windows arm64
|
||||
GOOS=windows GOARCH=arm64 go build -ldflags="-s -w" -o drip-${{ steps.version.outputs.VERSION }}-windows-arm64.exe ./cmd/drip
|
||||
|
||||
- name: Generate checksums
|
||||
run: |
|
||||
sha256sum drip-${{ steps.version.outputs.VERSION }}-* > checksums.txt
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
drip-${{ steps.version.outputs.VERSION }}-linux-amd64
|
||||
drip-${{ steps.version.outputs.VERSION }}-linux-arm64
|
||||
drip-${{ steps.version.outputs.VERSION }}-darwin-amd64
|
||||
drip-${{ steps.version.outputs.VERSION }}-darwin-arm64
|
||||
drip-${{ steps.version.outputs.VERSION }}-windows-amd64.exe
|
||||
drip-${{ steps.version.outputs.VERSION }}-windows-arm64.exe
|
||||
checksums.txt
|
||||
draft: false
|
||||
prerelease: false
|
||||
generate_release_notes: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user