Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
806d871
fish shell integration
iamshreeram Jun 1, 2025
74c79f8
fix shell prompt
iamshreeram Jun 1, 2025
2890043
install package manager inside env
iamshreeram Jun 1, 2025
469266c
install package manager inside env
iamshreeram Jun 1, 2025
606095e
Merge pull request #1 from iamshreeram/feature/fishshell
iamshreeram Jun 1, 2025
05aa482
release of uve
iamshreeram Jun 1, 2025
bd134a6
Merge pull request #2 from iamshreeram/feature/deploy
iamshreeram Jun 1, 2025
66379a4
Create go.yml
iamshreeram Jun 1, 2025
6812042
release of uve
iamshreeram Jun 1, 2025
f6fca27
Merge pull request #3 from iamshreeram/feature/deploy
iamshreeram Jun 1, 2025
69fcb18
Enable install script
iamshreeram Jun 2, 2025
aaa6523
Enable clone feature
iamshreeram Jun 3, 2025
4e15833
Merge pull request #5 from iamshreeram/feature/clone
iamshreeram Jun 3, 2025
42fdd67
Fixing release pipeline
iamshreeram Jun 3, 2025
2917144
Merge pull request #6 from iamshreeram/feature/devops
iamshreeram Jun 3, 2025
0886e58
Update release.yml
iamshreeram Jun 3, 2025
593d189
Update release.yml
iamshreeram Jun 16, 2025
9e2b1bf
Update release.yml
iamshreeram Jun 16, 2025
8f2fe03
Update uve-install.sh
iamshreeram Jun 16, 2025
3a84cbf
Update release.yml
iamshreeram Jun 16, 2025
d423b58
Update README.md
iamshreeram Jun 16, 2025
3150ebe
Update release.yml
iamshreeram Jun 16, 2025
f387319
Update release.yml
iamshreeram Jun 17, 2025
fac25e1
Update uve-install.sh
iamshreeram Jun 17, 2025
7d4d823
Update uve-install.sh
iamshreeram Jun 17, 2025
7bb172a
Merge pull request #8 from iamshreeram/fix/windows-installer
iamshreeram Jun 17, 2025
1968481
Update release.yml
iamshreeram Jun 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
197 changes: 197 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
name: Auto Release

on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened]
push:
branches:
- main # Trigger release when code is merged to main

permissions:
contents: write

jobs:
build-and-validate:
runs-on: ubuntu-latest
strategy:
matrix:
shell: [bash, sh, zsh, fish]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Build binaries
run: |
mkdir -p dist
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o dist/uve-linux-amd64
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o dist/uve-darwin-amd64
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o dist/uve-darwin-arm64
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o dist/uve-windows-amd64.exe

- name: Package release assets
run: |
tar czf dist/uve-linux-amd64.tar.gz -C dist uve-linux-amd64
tar czf dist/uve-darwin-amd64.tar.gz -C dist uve-darwin-amd64
tar czf dist/uve-darwin-arm64.tar.gz -C dist uve-darwin-arm64
zip dist/uve-windows-amd64.zip dist/uve-windows-amd64.exe
rm dist/uve-linux-amd64 dist/uve-darwin-amd64 dist/uve-darwin-arm64 dist/uve-windows-amd64.exe

- name: Copy install script
run: |
cp uve-install.sh dist/uve-install.sh
chmod +x dist/uve-install.sh

- name: Install zsh if needed
if: matrix.shell == 'zsh'
run: |
sudo apt-get update
sudo apt-get install -y zsh

- name: Install fish if needed
if: matrix.shell == 'fish'
run: |
sudo apt-get update
sudo apt-get install -y fish

- name: Validate install in ${{ matrix.shell }}
run: |
export HOME="$(mktemp -d)"
if [ "${{ matrix.shell }}" = "fish" ]; then
fish -c "bash dist/uve-install.sh"
else
${{ matrix.shell }} dist/uve-install.sh
fi
~/.local/bin/uve --version

release:
if: |
github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
outputs:
NEW_VERSION: ${{ steps.version.outputs.NEW_VERSION }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Determine next version
id: version
run: |
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "Last tag: $LAST_TAG"
VERSION_PARTS=(${LAST_TAG//./ })
MAJOR=$(echo ${VERSION_PARTS[0]} | sed 's/v//')
MINOR=${VERSION_PARTS[1]}
PATCH=${VERSION_PARTS[2]}
NEW_PATCH=$((PATCH + 1))
NEW_VERSION="v$MAJOR.$MINOR.$NEW_PATCH"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "New version will be: $NEW_VERSION"

- name: Create and push tag
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git tag ${{ steps.version.outputs.NEW_VERSION }}
git push origin ${{ steps.version.outputs.NEW_VERSION }}

- name: Build binaries
run: |
mkdir -p dist
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o dist/uve-linux-amd64
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o dist/uve-darwin-amd64
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o dist/uve-darwin-arm64
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o dist/uve-windows-amd64.exe

- name: Package release assets
run: |
tar czf dist/uve-linux-amd64.tar.gz -C dist uve-linux-amd64
tar czf dist/uve-darwin-amd64.tar.gz -C dist uve-darwin-amd64
tar czf dist/uve-darwin-arm64.tar.gz -C dist uve-darwin-arm64
zip dist/uve-windows-amd64.zip dist/uve-windows-amd64.exe
rm dist/uve-linux-amd64 dist/uve-darwin-amd64 dist/uve-darwin-arm64 dist/uve-windows-amd64.exe

- name: Copy install script
run: |
cp uve-install.sh dist/uve-install.sh
chmod +x dist/uve-install.sh

- name: Upload dist as artifact for validation jobs
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

validate-release-shells:
if: |
github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: release
runs-on: ubuntu-latest
strategy:
matrix:
shell: [bash, sh, zsh, fish]
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Install zsh if needed
if: matrix.shell == 'zsh'
run: |
sudo apt-get update
sudo apt-get install -y zsh

- name: Install fish if needed
if: matrix.shell == 'fish'
run: |
sudo apt-get update
sudo apt-get install -y fish

- name: Validate install in ${{ matrix.shell }}
run: |
export HOME="$(mktemp -d)"
if [ "${{ matrix.shell }}" = "fish" ]; then
fish -c "bash dist/uve-install.sh"
else
${{ matrix.shell }} dist/uve-install.sh
fi
~/.local/bin/uve --version

create-release:
if: |
github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [release, validate-release-shells]
runs-on: ubuntu-latest
steps:
- name: Download dist artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.release.outputs.NEW_VERSION }}
files: |
dist/*.tar.gz
dist/*.zip
dist/uve-install.sh
generate_release_notes: true
Loading
Loading