Files
schedtxt_models/.gitea/workflows/tag_release.yaml
T
phoenix 371a6d0be4
Go CI / Test and Lint (push) Successful in 7s
Go Release / build-and-release (pull_request) Successful in 6s
Go CI / Test and Lint (pull_request) Successful in 6s
bump: textsender-models
2026-05-28 20:02:27 -04:00

57 lines
1.5 KiB
YAML

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.26.2'
- name: Create version
id: version
run: |
echo "Creating version"
VERSION="0.2.4"
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 }}