Compare commits

...
Author SHA1 Message Date
phoenix 27b9f1df4d Changed type of Contact.UserId 2025-11-01 20:31:54 -04:00
phoenix f916a552f6 Formatting 2025-11-01 20:30:30 -04:00
phoenix 9f5c4ed095 Trying something out 2025-11-01 20:29:23 -04:00
phoenix 56aeac9e21 Adding Contact 2025-11-01 20:27:48 -04:00
phoenix 84d04c08d8 Updated version 2025-11-01 17:00:58 -04:00
phoenix 643d4240dc Added user sub package 2025-11-01 17:00:13 -04:00
phoenix 9398e36269 Workflow fix 2025-10-31 17:04:13 -04:00
phoenix aedaaa1de7 Updated workflow 2025-10-31 16:55:38 -04:00
phoenix a4317b4b22 Hard coding version for now 2025-10-31 14:48:38 -04:00
phoenix c654aa2d2e Added print statement 2025-10-31 14:46:20 -04:00
phoenix 8751050126 Updated workflow 2025-10-31 14:42:22 -04:00
phoenix 77c0c99927 Workflow fix 2025-10-31 14:39:02 -04:00
phoenix 4a15dc926a Added workflow for tag release 2025-10-31 14:37:32 -04:00
4 changed files with 85 additions and 1 deletions
+56
View File
@@ -0,0 +1,56 @@
name: Go Release
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-release:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25.3'
- name: Create version
id: version
run: |
echo "Creating version"
VERSION=$(git tag --sort=-version:refname | sed 's/-\(main\|devel\).*//' | uniq | head -n 1)
PROJECT_COMMIT_HASH=$(git rev-parse HEAD | cut -c 1-10)
BRANCH_REF="${{ gitea.ref }}"
BRANCH_NAME=$(echo "$BRANCH_REF" | cut -d '/' -f 3)
PROJECT_TAG_RELEASE="v$VERSION-$BRANCH_NAME-$PROJECT_COMMIT_HASH-556"
echo "::set-output name=project_tag_release::$PROJECT_TAG_RELEASE"
echo "Version: $VERSION"
echo "Hash: $PROJECT_COMMIT_HASH"
echo "Branh ref: $BRANCH_REF"
echo "Branch: $BRANCH_NAME"
echo "Tag Release: $PROJECT_TAG_RELEASE"
- name: Print version
id: Version
run: |
echo "Printing version"
echo "Version: ${{ steps.version.outputs.project_tag_release }}"
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.project_tag_release }}
release_name: Release ${{ steps.version.outputs.project_tag_release }}
body: |
Release of version ${{ steps.version.outputs.project_tag_release }}
+6 -1
View File
@@ -14,9 +14,14 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: '1.25.3'
- name: Configure Git for SSH
run: |
git config --global url."git@git.kundeng.us:".insteadOf "https://git.kundeng.us/"
go env -w GOPRIVATE=git.kundeng.us/phoenix/*
- name: Download dependencies
run: go mod download
run: |
go mod download
- name: Run tests
run: go test -v ./... # Runs all tests in the project
+10
View File
@@ -0,0 +1,10 @@
package contact
import (
"github.com/google/uuid"
)
type Contact struct {
PhoneNumber string `json:"phone_number,omitempty"`
UserId uuid.UUID `json:"user_id,omitempty"`
}
+13
View File
@@ -0,0 +1,13 @@
package user
import (
"github.com/google/uuid"
)
type User struct {
Id uuid.UUID `json:"id"`
PhoneNumber string `json:"phone_number"`
Username string `json:"username"`
Password string `json:"password"`
}