mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-03-25 13:30:52 +00:00
Compare commits
6 Commits
Release_4.
...
Release_4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
250d616129 | ||
|
|
fbf816d219 | ||
|
|
7f0133a196 | ||
|
|
f798f22434 | ||
|
|
248bc9f672 | ||
|
|
7a7db703f1 |
144
.github/workflows/release.yml
vendored
144
.github/workflows/release.yml
vendored
@@ -22,15 +22,34 @@ jobs:
|
||||
- name: Run tests
|
||||
run: make githubtests
|
||||
|
||||
# Then create release only if tests pass
|
||||
create-release:
|
||||
# Build binaries for each platform
|
||||
build:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
output_name: linux_amd64
|
||||
- os: ubuntu-24.04-arm
|
||||
goos: linux
|
||||
goarch: arm64
|
||||
output_name: linux_arm64
|
||||
- os: macos-15-intel
|
||||
goos: darwin
|
||||
goarch: amd64
|
||||
output_name: darwin_amd64
|
||||
- os: macos-latest
|
||||
goos: darwin
|
||||
goarch: arm64
|
||||
output_name: darwin_arm64
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
@@ -42,77 +61,61 @@ jobs:
|
||||
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
|
||||
- name: Install build tools (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
# Ensure Xcode Command Line Tools are installed
|
||||
xcode-select --install 2>/dev/null || true
|
||||
xcode-select -p
|
||||
|
||||
- name: Build binaries
|
||||
env:
|
||||
GOOS: ${{ matrix.goos }}
|
||||
GOARCH: ${{ matrix.goarch }}
|
||||
VERSION: ${{ steps.get_version.outputs.version }}
|
||||
run: |
|
||||
make obitools
|
||||
mkdir -p artifacts
|
||||
cd build
|
||||
for binary in *; do
|
||||
tar -czf ../artifacts/${binary}_${VERSION}_${{ matrix.output_name }}.tar.gz ${binary}
|
||||
done
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: binaries-${{ matrix.output_name }}
|
||||
path: artifacts/*
|
||||
|
||||
# Create the release
|
||||
create-release:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Extract version from tag
|
||||
id: get_version
|
||||
run: |
|
||||
TAG=${GITHUB_REF#refs/tags/Release_}
|
||||
echo "version=$TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: release-artifacts
|
||||
|
||||
- name: Prepare release directory
|
||||
run: |
|
||||
mkdir -p release
|
||||
|
||||
# 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
|
||||
# Windows binaries have .exe extension
|
||||
if [ -f "${binary}.exe" ]; then
|
||||
zip ../release/${binary}_${VERSION}_windows_amd64.zip ${binary}.exe
|
||||
else
|
||||
zip ../release/${binary}_${VERSION}_windows_amd64.zip ${binary}
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
|
||||
echo "Built archives:"
|
||||
find release-artifacts -type f -name "*.tar.gz" -exec cp {} release/ \;
|
||||
ls -lh release/
|
||||
|
||||
- name: Generate Release Notes
|
||||
id: release_notes
|
||||
env:
|
||||
VERSION: ${{ steps.get_version.outputs.version }}
|
||||
run: |
|
||||
@@ -157,11 +160,6 @@ jobs:
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ package obioptions
|
||||
// Version is automatically updated by the Makefile from version.txt
|
||||
// The patch number (third digit) is incremented on each push to the repository
|
||||
|
||||
var _Version = "Release 4.4.6"
|
||||
var _Version = "Release 4.4.8"
|
||||
|
||||
// Version returns the version of the obitools package.
|
||||
//
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.4.6
|
||||
4.4.8
|
||||
|
||||
Reference in New Issue
Block a user