Merge pull request #73 from metabarcoding/push-pklkwsssrkuv

Push pklkwsssrkuv
This commit is contained in:
coissac
2026-02-05 17:54:39 +01:00
committed by GitHub
4 changed files with 158 additions and 5 deletions

152
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,152 @@
name: Create Release on Tag
on:
push:
tags:
- "Release_*"
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Extract version from tag
id: get_version
run: |
TAG=${GITHUB_REF#refs/tags/Release_}
echo "version=$TAG" >> $GITHUB_OUTPUT
echo "tag_name=Release_$TAG" >> $GITHUB_OUTPUT
- name: Build binaries for multiple platforms
run: |
VERSION=${{ steps.get_version.outputs.version }}
mkdir -p release
# Get list of obitools to build
OBITOOLS=$(ls -d cmd/obitools/*/ | xargs -n 1 basename)
# Build for Linux AMD64
echo "Building for Linux AMD64..."
GOOS=linux GOARCH=amd64 make obitools
cd build
for binary in *; do
tar -czf ../release/${binary}_${VERSION}_linux_amd64.tar.gz ${binary}
done
cd ..
rm -rf build/*
# Build for Linux ARM64
echo "Building for Linux ARM64..."
GOOS=linux GOARCH=arm64 make obitools
cd build
for binary in *; do
tar -czf ../release/${binary}_${VERSION}_linux_arm64.tar.gz ${binary}
done
cd ..
rm -rf build/*
# Build for macOS AMD64 (Intel)
echo "Building for macOS AMD64..."
GOOS=darwin GOARCH=amd64 make obitools
cd build
for binary in *; do
tar -czf ../release/${binary}_${VERSION}_darwin_amd64.tar.gz ${binary}
done
cd ..
rm -rf build/*
# Build for macOS ARM64 (Apple Silicon)
echo "Building for macOS ARM64..."
GOOS=darwin GOARCH=arm64 make obitools
cd build
for binary in *; do
tar -czf ../release/${binary}_${VERSION}_darwin_arm64.tar.gz ${binary}
done
cd ..
rm -rf build/*
# Build for Windows AMD64
echo "Building for Windows AMD64..."
GOOS=windows GOARCH=amd64 make obitools
cd build
for binary in *; do
zip ../release/${binary}_${VERSION}_windows_amd64.zip ${binary}.exe
done
cd ..
ls -lh release/
- name: Generate Release Notes
id: release_notes
run: |
VERSION=${{ steps.get_version.outputs.version }}
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
echo "# OBITools4 Release ${VERSION}" > release_notes.md
echo "" >> release_notes.md
if [ -n "$PREV_TAG" ]; then
echo "## Changes since ${PREV_TAG}" >> release_notes.md
echo "" >> release_notes.md
git log ${PREV_TAG}..HEAD --pretty=format:"- %s" >> release_notes.md
else
echo "## Changes" >> release_notes.md
echo "" >> release_notes.md
git log --pretty=format:"- %s" -n 20 >> release_notes.md
fi
echo "" >> release_notes.md
echo "" >> release_notes.md
echo "## Installation" >> release_notes.md
echo "" >> release_notes.md
echo "Download the appropriate binary for your system and extract it:" >> release_notes.md
echo "" >> release_notes.md
echo "### Linux (AMD64)" >> release_notes.md
echo '```bash' >> release_notes.md
echo "tar -xzf <tool>_${VERSION}_linux_amd64.tar.gz" >> release_notes.md
echo '```' >> release_notes.md
echo "" >> release_notes.md
echo "### Linux (ARM64)" >> release_notes.md
echo '```bash' >> release_notes.md
echo "tar -xzf <tool>_${VERSION}_linux_arm64.tar.gz" >> release_notes.md
echo '```' >> release_notes.md
echo "" >> release_notes.md
echo "### macOS (Intel)" >> release_notes.md
echo '```bash' >> release_notes.md
echo "tar -xzf <tool>_${VERSION}_darwin_amd64.tar.gz" >> release_notes.md
echo '```' >> release_notes.md
echo "" >> release_notes.md
echo "### macOS (Apple Silicon)" >> release_notes.md
echo '```bash' >> release_notes.md
echo "tar -xzf <tool>_${VERSION}_darwin_arm64.tar.gz" >> release_notes.md
echo '```' >> release_notes.md
echo "" >> release_notes.md
echo "### Windows (AMD64)" >> release_notes.md
echo '```powershell' >> release_notes.md
echo "Expand-Archive <tool>_${VERSION}_windows_amd64.zip" >> release_notes.md
echo '```' >> release_notes.md
echo "" >> release_notes.md
echo "Available tools: Replace \`<tool>\` with one of the obitools commands." >> release_notes.md
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ steps.get_version.outputs.version }}
body_path: release_notes.md
files: release/*
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -137,10 +137,11 @@ jjpush:
@echo "$(BLUE)→ Documenting version bump commit...$(NC)" @echo "$(BLUE)→ Documenting version bump commit...$(NC)"
@jj auto-describe @jj auto-describe
@version=$$(cat version.txt); \ @version=$$(cat version.txt); \
echo "$(BLUE)→ Pushing commits and creating tag v$$version...$(NC)"; \ tag_name="Release_$$version"; \
echo "$(BLUE)→ Pushing commits and creating tag $$tag_name...$(NC)"; \
jj git push --change @; \ jj git push --change @; \
git tag -a "v$$version" -m "Release $$version" 2>/dev/null || echo "Tag v$$version already exists"; \ git tag -a "$$tag_name" -m "Release $$version" 2>/dev/null || echo "Tag $$tag_name already exists"; \
git push origin "v$$version" 2>/dev/null || echo "Tag already pushed" git push origin "$$tag_name" 2>/dev/null || echo "Tag already pushed"
@echo "$(GREEN)✓ Commits and tag pushed to repository$(NC)" @echo "$(GREEN)✓ Commits and tag pushed to repository$(NC)"
jjfetch: jjfetch:

View File

@@ -3,7 +3,7 @@ package obioptions
// Version is automatically updated by the Makefile from version.txt // Version is automatically updated by the Makefile from version.txt
// The patch number (third digit) is incremented on each push to the repository // The patch number (third digit) is incremented on each push to the repository
var _Version = "Release 4.4.4" var _Version = "Release 4.4.5"
// Version returns the version of the obitools package. // Version returns the version of the obitools package.
// //

View File

@@ -1 +1 @@
4.4.4 4.4.5