Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 31c5d24a8b | |||
| 9194abb7cd | |||
| 24b3db0413 | |||
| 99518ccf28 | |||
| 559f4ac086 |
@@ -11,44 +11,17 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# 1. Checkout source code
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# 2. Setup Go environment
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.24.5'
|
go-version: '1.24.5'
|
||||||
|
|
||||||
# 3. Build binary with Version injected
|
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
run: |
|
run: |
|
||||||
VERSION=${GITEA_REF_NAME}
|
VERSION=${GITEA_REF_NAME}
|
||||||
echo "Building version $VERSION"
|
echo "Building version $VERSION"
|
||||||
go mod tidy
|
go mod tidy
|
||||||
go build -ldflags "-s -w -X main.Version=$VERSION" -o lab-ca .
|
go build -ldflags "-s -w -X main.Version=$VERSION" -o lab-ca .
|
||||||
|
|
||||||
# 4. Install the tea CLI
|
|
||||||
- name: Install tea CLI
|
|
||||||
run: go install code.gitea.io/tea@latest
|
|
||||||
|
|
||||||
# 5. Authenticate tea CLI
|
|
||||||
- name: Login to Gitea
|
|
||||||
run: |
|
|
||||||
tea login add --name ci --url $GITEA_URL --token $GITEA_TOKEN
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
GITEA_URL: ${{ secrets.GITEA_URL }}
|
|
||||||
|
|
||||||
# 6. Create or update release
|
|
||||||
- name: Create or update release
|
|
||||||
run: |
|
|
||||||
tea release create $GITEA_REF_NAME \
|
|
||||||
--title "$GITEA_REF_NAME" \
|
|
||||||
--note "Automated release for $GITEA_REF_NAME" || \
|
|
||||||
echo "Release already exists, skipping create."
|
|
||||||
|
|
||||||
# 7. Upload binary to the release
|
|
||||||
- name: Upload binary
|
|
||||||
run: tea release upload $GITEA_REF_NAME lab-ca
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# Lab CA
|
# Lab CA
|
||||||
|
|
||||||
|
[](https://gitea.koszewscy.waw.pl/slawek/lab-ca/actions?workflow=release.yml)
|
||||||
|
|
||||||
This repository contains a simple CLI tool for managing a Certificate Authority (CA).
|
This repository contains a simple CLI tool for managing a Certificate Authority (CA).
|
||||||
|
|
||||||
It is designed to be easy to use and provides a basic set of CA features:
|
It is designed to be easy to use and provides a basic set of CA features:
|
||||||
|
|||||||
Reference in New Issue
Block a user