v1.1.3 #114
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Build universal libyaml (arm64 + x86_64) | |
| run: | | |
| set -euo pipefail | |
| YAML_VERSION=0.2.5 | |
| YAML_PREFIX="$PWD/deps/libyaml-universal" | |
| mkdir -p "$YAML_PREFIX" | |
| echo "Downloading libyaml ${YAML_VERSION}..." | |
| curl -L "https://pyyaml.org/download/libyaml/yaml-${YAML_VERSION}.tar.gz" -o libyaml.tar.gz | |
| tar -xzf libyaml.tar.gz | |
| cd "yaml-${YAML_VERSION}" | |
| echo "Configuring universal libyaml..." | |
| CFLAGS="-arch arm64 -arch x86_64" LDFLAGS="-arch arm64 -arch x86_64" ./configure --prefix="$YAML_PREFIX" | |
| echo "Building libyaml..." | |
| make -j"$(sysctl -n hw.ncpu)" | |
| echo "Installing libyaml to ${YAML_PREFIX}..." | |
| make install | |
| echo "PKG_CONFIG_PATH=${YAML_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH:-}" >> "$GITHUB_ENV" | |
| - name: Set up version | |
| id: version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "$VERSION" > VERSION | |
| - name: Extract tag message | |
| id: tag_message | |
| run: | | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| # Get the full tag message (subject + body) | |
| TAG_MESSAGE=$(git tag -l --format='%(contents)' "$TAG_NAME") | |
| # Remove leading/trailing whitespace but preserve internal formatting | |
| TAG_MESSAGE=$(echo "$TAG_MESSAGE" | sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' -e 's/^[[:space:]]*//;s/[[:space:]]*$//') | |
| # Use multiline output format for GitHub Actions | |
| { | |
| echo 'body<<EOF' | |
| echo "$TAG_MESSAGE" | |
| echo 'EOF' | |
| } >> $GITHUB_OUTPUT | |
| - name: Regenerate man page (optional) | |
| run: | | |
| if command -v pandoc >/dev/null 2>&1; then | |
| make man || echo "Warning: Man page generation failed, using pre-generated version" | |
| else | |
| echo "Pandoc not available, using pre-generated man page from repository" | |
| fi | |
| - name: Build macOS universal binary | |
| env: | |
| VERSION: ${{ env.VERSION }} | |
| SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY || '-' }} | |
| run: | | |
| set -o pipefail | |
| cmake --version | |
| make release-macos SIGNING_IDENTITY="${SIGNING_IDENTITY}" 2>&1 | tee build.log | |
| - name: Create checksums | |
| env: | |
| VERSION: ${{ env.VERSION }} | |
| run: | | |
| shasum -a 256 "release/apex-${VERSION}-macos-universal.tar.gz" > "release/apex-${VERSION}-macos-universal.tar.gz.sha256" | |
| cat "release/apex-${VERSION}-macos-universal.tar.gz.sha256" | |
| - name: Upload macOS release | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| body: ${{ steps.tag_message.outputs.body }} | |
| generate_release_notes: false | |
| files: | | |
| release/apex-${{ env.VERSION }}-macos-universal.tar.gz | |
| release/apex-${{ env.VERSION }}-macos-universal.tar.gz.sha256 | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up version | |
| id: version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Version: $VERSION" | |
| echo "$VERSION" > VERSION | |
| - name: Extract tag message | |
| id: tag_message | |
| run: | | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| # Get the full tag message (subject + body) | |
| TAG_MESSAGE=$(git tag -l --format='%(contents)' "$TAG_NAME") | |
| # Remove leading/trailing whitespace but preserve internal formatting | |
| TAG_MESSAGE=$(echo "$TAG_MESSAGE" | sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' -e 's/^[[:space:]]*//;s/[[:space:]]*$//') | |
| # Use multiline output format for GitHub Actions | |
| { | |
| echo 'body<<EOF' | |
| echo "$TAG_MESSAGE" | |
| echo 'EOF' | |
| } >> $GITHUB_OUTPUT | |
| - name: Regenerate man page (optional) | |
| run: | | |
| if command -v pandoc >/dev/null 2>&1; then | |
| make man || echo "Warning: Man page generation failed, using pre-generated version" | |
| else | |
| echo "Pandoc not available, using pre-generated man page from repository" | |
| fi | |
| - name: Build Linux binary | |
| env: | |
| VERSION: ${{ env.VERSION }} | |
| run: | | |
| make release-linux | |
| - name: Create checksums | |
| env: | |
| VERSION: ${{ env.VERSION }} | |
| run: | | |
| sha256sum release/apex-${VERSION}-linux-*.tar.gz > release/apex-${VERSION}-linux-x86_64.tar.gz.sha256 | |
| cat release/apex-${VERSION}-linux-*.tar.gz.sha256 | |
| - name: Upload Linux release | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| body: ${{ steps.tag_message.outputs.body }} | |
| generate_release_notes: false | |
| files: | | |
| release/apex-${{ env.VERSION }}-linux-*.tar.gz | |
| release/apex-${{ env.VERSION }}-linux-*.tar.gz.sha256 | |
| build-linux-arm: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up version | |
| id: version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Version: $VERSION" | |
| echo "$VERSION" > VERSION | |
| - name: Extract tag message | |
| id: tag_message | |
| run: | | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| # Get the full tag message (subject + body) | |
| TAG_MESSAGE=$(git tag -l --format='%(contents)' "$TAG_NAME") | |
| # Remove leading/trailing whitespace but preserve internal formatting | |
| TAG_MESSAGE=$(echo "$TAG_MESSAGE" | sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' -e 's/^[[:space:]]*//;s/[[:space:]]*$//') | |
| # Use multiline output format for GitHub Actions | |
| { | |
| echo 'body<<EOF' | |
| echo "$TAG_MESSAGE" | |
| echo 'EOF' | |
| } >> $GITHUB_OUTPUT | |
| - name: Regenerate man page (optional) | |
| run: | | |
| if command -v pandoc >/dev/null 2>&1; then | |
| make man || echo "Warning: Man page generation failed, using pre-generated version" | |
| else | |
| echo "Pandoc not available, using pre-generated man page from repository" | |
| fi | |
| - name: Build Linux ARM binary | |
| env: | |
| VERSION: ${{ env.VERSION }} | |
| run: | | |
| make release-linux | |
| - name: Create checksums | |
| env: | |
| VERSION: ${{ env.VERSION }} | |
| run: | | |
| sha256sum release/apex-${VERSION}-linux-*.tar.gz > release/apex-${VERSION}-linux-aarch64.tar.gz.sha256 | |
| cat release/apex-${VERSION}-linux-*.tar.gz.sha256 | |
| - name: Upload Linux ARM release | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| body: ${{ steps.tag_message.outputs.body }} | |
| generate_release_notes: false | |
| files: | | |
| release/apex-${{ env.VERSION }}-linux-*.tar.gz | |
| release/apex-${{ env.VERSION }}-linux-*.tar.gz.sha256 |