feat: issue template and release ci/cd

This commit is contained in:
verse91
2026-05-10 01:25:24 +07:00
parent 9fd54c8c3d
commit b5c0e5ec3d
4 changed files with 195 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
name: Bug Report
description: Report a bug
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help everyone identify and fix the bug
- type: textarea
id: description
attributes:
label: Describe your issue
placeholder: When I click here this happens
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Enhance this function
2. Refactor this
3. Refactor that
validations:
required: true
- type: textarea
id: expected
attributes:
label: What was the expected result?
placeholder: I expected this to happen
- type: textarea
id: screenshots
attributes:
label: Put here any screenshots or videos (optional)
- type: textarea
id: deviceinfo
attributes:
label: Your OS and Browser (optional)
placeholder: |
- OS: Windows 10
- Browser: Chrome 90.0
- type: dropdown
id: assign
attributes:
label: "Would you like to work on this issue?"
options:
- "Yes"
- type: markdown
attributes:
value: |
Thanks for reporting this issue! We will get back to you as soon as possible.
+36
View File
@@ -0,0 +1,36 @@
name: New feature
description: Suggest or request a new feature
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the new feature you are suggesting.
- type: textarea
id: description
attributes:
label: Describe the feature
placeholder: A feature X that allows to do Y
validations:
required: true
- type: textarea
id: rationale
attributes:
label: It should be implemented because
placeholder: It will allow to do Y that is needed for Z
- type: textarea
id: context
attributes:
label: Additional context
placeholder: |
Add any other context or screenshots about the feature request here.
- type: dropdown
id: assign
attributes:
label: "Would you like to work on this issue?"
options:
- "Yes"
- type: markdown
attributes:
value: |
Thanks for your suggestion! Let's see together if it can be implemented.
+17
View File
@@ -0,0 +1,17 @@
# Issues template
I created this template to help you report bugs or suggest new features more easily without having to manually write them.
If you have any questions, please submit a Pull Request (PR) or open Issues.
If you can improve my issues template, please open a PR.
<img width="1163" height="364" alt="image" src="https://github.com/user-attachments/assets/125eb950-c5c1-4762-b02d-4f8fb3a5ceaf" />
<div align="center"><i>You can choose one of these three</i></div>
<img width="1992" height="1323" alt="image" src="https://github.com/user-attachments/assets/f63014ee-fac5-4c0e-b846-8f168ca42921" />
<div align="center"><i>Bug Report</i></div>
<img width="2027" height="1326" alt="image" src="https://github.com/user-attachments/assets/7ecd00a9-0457-4980-88c6-91ec849f67b0" />
<div align="center"><i>New Feature</i></div>
+91
View File
@@ -0,0 +1,91 @@
name: Release
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches: [ '**' ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
quality-and-release:
name: Quality & Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Run Linter
uses: golangci/golangci-lint-action@v6
with:
version: latest
- name: Run Tests
run: go test -v ./...
- name: Build Binaries
if: startsWith(github.ref, 'refs/tags/v')
run: |
mkdir -p dist
platforms=("linux/amd64" "linux/arm64" "darwin/amd64" "darwin/arm64")
for platform in "${platforms[@]}"; do
os_arch=(${platform//\// })
GOOS=${os_arch[0]}
GOARCH=${os_arch[1]}
output_name="iris"
[ "$GOOS" == "windows" ] && output_name="iris.exe"
echo "Building $GOOS/$GOARCH..."
GOOS=$GOOS GOARCH=$GOARCH go build \
-ldflags="-s -w -X github.com/versenilvis/iris/root.Version=${{ github.ref_name }}" \
-trimpath -o "dist/$output_name" main.go
cd dist
tar -czf "iris_${GOOS}_${GOARCH}.tar.gz" "$output_name"
rm "$output_name"
cd ..
done
- name: Prepare Release Notes
if: startsWith(github.ref, 'refs/tags/v')
run: |
# Generate standard GitHub release notes
GEN_NOTES=$(gh api repos/${{ github.repository }}/releases/generate-notes -f tag_name=${{ github.ref_name }} --jq .body)
echo "RELEASE_BODY<<EOF" >> $GITHUB_ENV
echo "$GEN_NOTES" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo "## Installation" >> $GITHUB_ENV
echo "\`\`\`bash" >> $GITHUB_ENV
echo "curl -sS https://raw.githubusercontent.com/versenilvis/iris/main/scripts/install.sh | sudo sh" >> $GITHUB_ENV
echo "\`\`\`" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
body: ${{ env.RELEASE_BODY }}
files: dist/*.tar.gz
generate_release_notes: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}