Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 34 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019 - 2025 Alexander Grund
# Copyright 2019 - 2026 Alexander Grund
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt

Expand All @@ -18,19 +18,33 @@ jobs:
contents: write
env:
DEP_DIR: ${{github.workspace}}/dependencies
BOOST_VERSION: 1.66.0
steps:
- uses: actions/checkout@v4
- name: Extract tag name
- name: Extract tag name and matching commit on standalone branch
id: get_tag
run: |
echo "Running for $GITHUB_EVENT_NAME event"
git fetch origin master develop standalone
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
SOURCE_SHA=$(git merge-base "${{github.sha}}" origin/develop)
else
version=$(grep "set(_version " CMakeLists.txt | head -n1 | sed 's/^.* \([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')
echo "tag=v$version" >> $GITHUB_OUTPUT
SOURCE_SHA=$(git rev-parse origin/develop)
fi
SOURCE_SHA=$(git rev-parse --short "$SOURCE_SHA")
# Find matching standalone commit hash
standalone_commit_matches=$(git log origin/standalone --format="%H" --grep="^Source commit: $SOURCE_SHA\$")
if ! count=$(grep -c . <<<"$standalone_commit_matches"); then
echo "ERROR: Did not found source commit for $SOURCE_SHA"
exit 1
elif [[ $count -ne 1 ]]; then
echo "ERROR: Found more than 1 related commit: $standalone_commit_matches"
exit 1
fi
echo "source_commit=$SOURCE_SHA" >> $GITHUB_OUTPUT
echo "standalone_commit=$standalone_commit_matches" >> $GITHUB_OUTPUT
- name: Sanity check version
run: |
version=${{steps.get_tag.outputs.tag}}
Expand All @@ -42,7 +56,8 @@ jobs:
fi
- name: Create documentation
run: |
sudo apt-get install doxygen
sudo apt-get -o Acquire::Retries=3 -y -q --no-install-suggests --no-install-recommends update
sudo apt-get -o Acquire::Retries=3 -y -q --no-install-suggests --no-install-recommends install doxygen
doc/gendoc.sh
tar -czf documentation.tar.gz doc index.html

Expand All @@ -69,7 +84,7 @@ jobs:
cp -r build cmake config include src test CMakeLists.txt Config.cmake.in "$FOLDER"
tar -czf nowide.tar.gz "$FOLDER"
- name: Install boost
run: sudo apt-get install -y libboost-all-dev
run: sudo apt-get -o Acquire::Retries=3 -y -q --no-install-suggests --no-install-recommends install -y libboost-all-dev
- name: Test Boost release tarball
run: |
tmp_dir=$(mktemp -d -p "$RUNNER_TEMP")
Expand All @@ -88,6 +103,20 @@ jobs:
mv nowide_standalone.tar.gz nowide_standalone_${{steps.get_tag.outputs.tag}}.tar.gz
mv documentation.tar.gz nowide_docu.tar.gz

- name: Tag standalone branch
run: |
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config --global user.name "$GITHUB_ACTOR"
version=${{steps.get_tag.outputs.tag}}
tag_name=standalone-$version
git tag -a "$tag_name" "${{steps.get_tag.outputs.standalone_commit}}" \
-m "Standalone version for v$version" \
-m "Source-Commit: ${{steps.get_tag.outputs.source_commit}}"
git show "$tag_name"
if [[ "{{github.event_name}}" == "push" ]]; then
git push origin "$tag_name"
fi

- name: Create Release
if: github.event_name == 'push'
uses: softprops/action-gh-release@v2
Expand Down
10 changes: 9 additions & 1 deletion doc/main.dox
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,10 @@ The meaning of a locale under POSIX and Windows platforms is different and has v

\subsection standalone_version Standalone Version

It is possible to use Nowide library without having the huge Boost project as a dependency. There is a standalone version that has all the functionality in the \c nowide namespace instead of \c boost::nowide. The example above would look like
It is possible to use the Nowide library without having the huge Boost project as a dependency.
There is a standalone version that has all the functionality in the \c nowide namespace instead of \c boost::nowide.

The example above would look like this:

\code
#include <nowide/args.hpp>
Expand Down Expand Up @@ -469,5 +472,10 @@ The upstream sources can be found at GitHub: <a href="https://github.com/boostor
You can download the latest sources there:

- Standard Version: <a href="https://github.com/boostorg/nowide/archive/master.zip">nowide-master.zip</a>
- Standalone Version: <a href="https://github.com/boostorg/nowide/archive/standalone.zip">nowide-standalone.zip</a> (automatically populated from the develop branch)

See the <a href="https://github.com/boostorg/nowide/releases">Releases section on GitHub</a> for Downloads of tagged releases.
Both the standard (Boost) and standalone sources can be downloaded there along with the HTML documentation in a separate archive.
Tags for the standalone version are prefixed with "standalone-" so they can be fetched too.

*/