Skip to content

Updated reply and added thread APIs #3

Updated reply and added thread APIs

Updated reply and added thread APIs #3

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
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.22.x
- name: Run tests
run: go test -v ./...
- name: Build
run: go build -v ./...
- name: Generate changelog
id: changelog
run: |
# Extract version from tag
VERSION=${GITHUB_REF#refs/tags/}
echo "version=$VERSION" >> $GITHUB_OUTPUT
# Generate changelog from git log
if [ $(git tag | wc -l) -eq 1 ]; then
# First release
CHANGELOG=$(git log --pretty=format:"- %s" --no-merges)
else
# Get previous tag
PREV_TAG=$(git tag --sort=-version:refname | sed -n '2p')
CHANGELOG=$(git log ${PREV_TAG}..HEAD --pretty=format:"- %s" --no-merges)
fi
# Save changelog to file
echo "$CHANGELOG" > changelog.txt
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ steps.changelog.outputs.version }}
body_path: changelog.txt
draft: false
prerelease: ${{ contains(github.ref, '-') }}