Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Commit

Permalink
Add man pages to pre-built binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
sorairolake committed Sep 18, 2021
1 parent c5673a8 commit 0b0807f
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions .github/workflows/CD.yaml
Expand Up @@ -45,12 +45,45 @@ jobs:
- name: Get version
id: get_version
uses: battila7/get-version-action@v2.2.1
- name: Create a package for Unix
- name: Setup Ruby
if: matrix.os != 'windows-2019'
run: tar czvf "rshash-${{ steps.get_version.outputs.version }}-${{ matrix.target }}.tar.gz" AUTHORS.adoc CHANGELOG.adoc README.adoc COPYING -C target/${{ matrix.target }}/release rshash
- name: Create a package for Windows
if: matrix.os == 'windows-2019'
run: 7z a -bb "rshash-${{ steps.get_version.outputs.version }}-${{ matrix.target }}.zip" AUTHORS.adoc CHANGELOG.adoc README.adoc COPYING ./target/${{ matrix.target }}/release/rshash.exe
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: Install Asciidoctor
if: matrix.os != 'windows-2019'
run: |
gem update --system
gem install asciidoctor
asciidoctor -V
- name: Build man pages
if: matrix.os != 'windows-2019'
run: |
mkdir -p doc/man/dest
asciidoctor -a "revnumber=${{ steps.get_version.outputs.version-without-v }}" -b manpage -D doc/man/dest doc/man/man*/*.adoc
- name: Create a package
shell: bash
run: |
if [ "${{ matrix.os }}" != "windows-2019" ] ; then
bin="target/${{ matrix.target }}/release/rshash"
else
bin="target/${{ matrix.target }}/release/rshash.exe"
fi
package="rshash-${{ steps.get_version.outputs.version }}-${{ matrix.target }}"
mkdir -p "${package}"/doc
cp README.adoc COPYING "${bin}" "${package}"
cp {AUTHORS,BUILD,CHANGELOG,CONTRIBUTING}.adoc "${package}"/doc
if [ "${{ matrix.os }}" != "windows-2019" ] ; then
mkdir -p "${package}"/man
cp doc/man/dest/* "${package}"/man
fi
if [ "${{ matrix.os }}" != "windows-2019" ] ; then
ls "${package}" | tar cJvf "${package}.tar.xz" --format=pax -C "${package}" -T -
else
7z a -bb "${package}.7z" ./"${package}"/*
fi
- name: Release
uses: softprops/action-gh-release@v0.1.13
with:
Expand Down

0 comments on commit 0b0807f

Please sign in to comment.