Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
workflows

Update README.md

readme

readme

Update README.md

workflows
  • Loading branch information
userdocs committed Dec 28, 2023
1 parent 85d1518 commit fa4d0df
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 132 deletions.
40 changes: 23 additions & 17 deletions .github/workflows/matrix_multi_build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,31 +182,37 @@ jobs:
pandoc_git_tag="$(git ls-remote -q -t --refs https://github.com/jgm/pandoc.git | awk '/tags\/[0-9]/{sub("refs/tags/", ""); print $2 }' | awk '!/^$/' | sort -rV | head -n 1)"
curl -sLo- "https://github.com/jgm/pandoc/releases/latest/download/pandoc-${pandoc_git_tag}-linux-amd64.tar.gz" | tar xzf - --strip-components 2 -C "$(pwd)" --exclude="share"
- name: Host - Download qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
- name: Host - Download 1.2 qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
uses: actions/download-artifact@v4
with:
path: "1.2"
pattern: libtorrent-v1.2-*-qbittorrent-nox
merge-multiple: true

- name: Host - Download 2.0 qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
uses: actions/download-artifact@v4
with:
path: "2.0"
pattern: libtorrent-v2.0-*-qbittorrent-nox
merge-multiple: true

- name: Host - 1.2 artifacts organise for release ${{ github.event.inputs.distinct_id }}
- name: Host - merge release-info ${{ github.event.inputs.distinct_id }}
run: |
mkdir -p "1.2"
for files in libtorrent-v1.2-*-qbittorrent-nox; do
cp -rf ${files}/* "1.2/"
for release in 1\.2/*-release.md 2\.0/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
- name: Host - 2.0 artifacts organise for release ${{ github.event.inputs.distinct_id }}
run: |
mkdir -p "2.0"
for files in libtorrent-v2.0-*-qbittorrent-nox; do
cp -rf ${files}/* "2.0/"
for dependency_version in 1\.2/*-dependency-version.json 2\.0/*-dependency-version.json; do
[[ -f "${dependency_version}" ]] && dependency_version+=("${dependency_version}")
done
- name: Host - merge release-info ${{ github.event.inputs.distinct_id }}
run: |
paste -d '\n' 1.2/qt5-*-release.md | uniq > 1.2/tmp-release.md
paste -d '\n' 2.0/qt6-*-release.md | uniq > 2.0/tmp-release.md
paste -d '\n' 1.2/tmp-release.md 2.0/tmp-release.md | uniq > tmp-release.md
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
readarray -t release_sorted < <(printf '%s\n' "${release[@]}" | sort)
readarray -t dependency_version_sorted < <(printf '%s\n' "${dependency_version[@]}" | sort)
paste -d '\n' 1.2/qt5-dependency-version.json 2.0/qt6-dependency-version.json | uniq > dependency-version.json
paste -d '\n' "${release_sorted[@]}" | uniq | awk '!(NF && seen[$0]++) || /^>/' > "tmp-release.md"
paste -d '\n' "${dependency_version_sorted[@]}" | uniq | awk '!(NF && seen[$0]++)' > "dependency-version.json"
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
- name: Host - Bootstrap release tag ${{ github.event.inputs.distinct_id }}
run: printf '%s\n' "release_tag=$(cat ${{ matrix.qbt_libtorrent_version }}/tag.md)" >> $GITHUB_ENV
Expand Down
40 changes: 23 additions & 17 deletions .github/workflows/matrix_multi_build_and_release_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,31 +246,37 @@ jobs:
pandoc_git_tag="$(git ls-remote -q -t --refs https://github.com/jgm/pandoc.git | awk '/tags\/[0-9]/{sub("refs/tags/", ""); print $2 }' | awk '!/^$/' | sort -rV | head -n 1)"
curl -sLo- "https://github.com/jgm/pandoc/releases/latest/download/pandoc-${pandoc_git_tag}-linux-amd64.tar.gz" | tar xzf - --strip-components 2 -C "$(pwd)" --exclude="share"
- name: Host - Download qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
- name: Host - Download 1.2 qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
uses: actions/download-artifact@v4
with:
path: "1.2"
pattern: libtorrent-v1.2-*-qbittorrent-nox
merge-multiple: true

- name: Host - Download 2.0 qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
uses: actions/download-artifact@v4
with:
path: "2.0"
pattern: libtorrent-v2.0-*-qbittorrent-nox
merge-multiple: true

- name: Host - 1.2 artifacts organise for release ${{ github.event.inputs.distinct_id }}
- name: Host - merge release-info ${{ github.event.inputs.distinct_id }}
run: |
mkdir -p "1.2"
for files in libtorrent-v1.2-*-qbittorrent-nox; do
cp -rf ${files}/* "1.2/"
for release in 1\.2/*-release.md 2\.0/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
- name: Host - 2.0 artifacts organise for release ${{ github.event.inputs.distinct_id }}
run: |
mkdir -p "2.0"
for files in libtorrent-v2.0-*-qbittorrent-nox; do
cp -rf ${files}/* "2.0/"
for dependency_version in 1\.2/*-dependency-version.json 2\.0/*-dependency-version.json; do
[[ -f "${dependency_version}" ]] && dependency_version+=("${dependency_version}")
done
- name: Host - merge release-info ${{ github.event.inputs.distinct_id }}
run: |
paste -d '\n' 1.2/qt5-*-release.md | uniq > 1.2/tmp-release.md
paste -d '\n' 2.0/qt6-*-release.md | uniq > 2.0/tmp-release.md
paste -d '\n' 1.2/tmp-release.md 2.0/tmp-release.md | uniq > tmp-release.md
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
readarray -t release_sorted < <(printf '%s\n' "${release[@]}" | sort)
readarray -t dependency_version_sorted < <(printf '%s\n' "${dependency_version[@]}" | sort)
paste -d '\n' 1.2/qt5-dependency-version.json 2.0/qt6-dependency-version.json | uniq > dependency-version.json
paste -d '\n' "${release_sorted[@]}" | uniq | awk '!(NF && seen[$0]++) || /^>/' > "tmp-release.md"
paste -d '\n' "${dependency_version_sorted[@]}" | uniq | awk '!(NF && seen[$0]++)' > "dependency-version.json"
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
- name: Host - Bootstrap release tag ${{ github.event.inputs.distinct_id }}
run: printf '%s\n' "release_tag=$(cat ${{ matrix.qbt_libtorrent_version }}/tag.md)" >> $GITHUB_ENV
Expand Down
40 changes: 23 additions & 17 deletions .github/workflows/matrix_multi_build_and_release_customs_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,31 +192,37 @@ jobs:
pandoc_git_tag="$(git ls-remote -q -t --refs https://github.com/jgm/pandoc.git | awk '/tags\/[0-9]/{sub("refs/tags/", ""); print $2 }' | awk '!/^$/' | sort -rV | head -n 1)"
curl -sLo- "https://github.com/jgm/pandoc/releases/latest/download/pandoc-${pandoc_git_tag}-linux-amd64.tar.gz" | tar xzf - --strip-components 2 -C "$(pwd)" --exclude="share"
- name: Host - Download qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
- name: Host - Download 1.2 qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
uses: actions/download-artifact@v4
with:
path: "1.2"
pattern: libtorrent-v1.2-*-qbittorrent-nox
merge-multiple: true

- name: Host - Download 2.0 qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
uses: actions/download-artifact@v4
with:
path: "2.0"
pattern: libtorrent-v2.0-*-qbittorrent-nox
merge-multiple: true

- name: Host - 1.2 artifacts organise for release ${{ github.event.inputs.distinct_id }}
- name: Host - merge release-info ${{ github.event.inputs.distinct_id }}
run: |
mkdir -p "1.2"
for files in libtorrent-v1.2-*-qbittorrent-nox; do
cp -rf ${files}/* "1.2/"
for release in 1\.2/*-release.md 2\.0/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
- name: Host - 2.0 artifacts organise for release ${{ github.event.inputs.distinct_id }}
run: |
mkdir -p "2.0"
for files in libtorrent-v2.0-*-qbittorrent-nox; do
cp -rf ${files}/* "2.0/"
for dependency_version in 1\.2/*-dependency-version.json 2\.0/*-dependency-version.json; do
[[ -f "${dependency_version}" ]] && dependency_version+=("${dependency_version}")
done
- name: Host - merge release-info ${{ github.event.inputs.distinct_id }}
run: |
paste -d '\n' 1.2/qt5-*-release.md | uniq > 1.2/tmp-release.md
paste -d '\n' 2.0/qt6-*-release.md | uniq > 2.0/tmp-release.md
paste -d '\n' 1.2/tmp-release.md 2.0/tmp-release.md | uniq > tmp-release.md
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
readarray -t release_sorted < <(printf '%s\n' "${release[@]}" | sort)
readarray -t dependency_version_sorted < <(printf '%s\n' "${dependency_version[@]}" | sort)
paste -d '\n' 1.2/qt5-dependency-version.json 2.0/qt6-dependency-version.json | uniq > dependency-version.json
paste -d '\n' "${release_sorted[@]}" | uniq | awk '!(NF && seen[$0]++) || /^>/' > "tmp-release.md"
paste -d '\n' "${dependency_version_sorted[@]}" | uniq | awk '!(NF && seen[$0]++)' > "dependency-version.json"
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
- name: Host - Bootstrap release tag ${{ github.event.inputs.distinct_id }}
run: printf '%s\n' "release_tag=$(cat ${{ matrix.qbt_libtorrent_version }}/tag.md)" >> $GITHUB_ENV
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ jobs:
matrix:
qbt_libtorrent_version: ["1.2", "2.0"]
include:
- qbt_libtorrent_version: "2.0"
preview_release: false

- qbt_libtorrent_version: "1.2"
preview_release: true

- qbt_libtorrent_version: "2.0"
preview_release: false

name: "Publish release libtorrent-v${{ matrix.qbt_libtorrent_version }}"

env:
Expand Down Expand Up @@ -198,18 +198,27 @@ jobs:

- name: Host - merge release-info ${{ github.event.inputs.distinct_id }}
run: |
for release in 1\.2/*-release.md 2\.0/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
if [[ ${{ matrix.qbt_libtorrent_version }} == "1.2" ]]; then
for release in 1\.2/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
fi
if [[ ${{ matrix.qbt_libtorrent_version }} == "2.0" ]]; then
for release in 2\.0/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
fi
readarray -t release_sorted < <(printf '%s\n' "${release[@]}" | sort)
for dependency_version in 1\.2/*-dependency-version.json 2\.0/*-dependency-version.json; do
[[ -f "${dependency_version}" ]] && dependency_version+=("${dependency_version}")
done
readarray -t release_sorted < <(printf '%s\n' "${release[@]}" | sort)
readarray -t dependency_version_sorted < <(printf '%s\n' "${dependency_version[@]}" | sort)
paste -d '\n' "${release_sorted[@]}" | uniq | awk '!(NF && seen[$0]++)' > "tmp-release.md"
paste -d '\n' "${release_sorted[@]}" | uniq | awk '!(NF && seen[$0]++) || /^>/' > "tmp-release.md"
paste -d '\n' "${dependency_version_sorted[@]}" | uniq | awk '!(NF && seen[$0]++)' > "dependency-version.json"
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,31 +178,37 @@ jobs:
pandoc_git_tag="$(git ls-remote -q -t --refs https://github.com/jgm/pandoc.git | awk '/tags\/[0-9]/{sub("refs/tags/", ""); print $2 }' | awk '!/^$/' | sort -rV | head -n 1)"
curl -sLo- "https://github.com/jgm/pandoc/releases/latest/download/pandoc-${pandoc_git_tag}-linux-amd64.tar.gz" | tar xzf - --strip-components 2 -C "$(pwd)" --exclude="share"
- name: Host - Download qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
- name: Host - Download 1.2 qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
uses: actions/download-artifact@v4
with:
path: "1.2"
pattern: libtorrent-v1.2-*-qbittorrent-nox
merge-multiple: true

- name: Host - Download 2.0 qbittorrent-nox artifacts ${{ github.event.inputs.distinct_id }}
uses: actions/download-artifact@v4
with:
path: "2.0"
pattern: libtorrent-v2.0-*-qbittorrent-nox
merge-multiple: true

- name: Host - 1.2 artifacts organise for release ${{ github.event.inputs.distinct_id }}
- name: Host - merge release-info ${{ github.event.inputs.distinct_id }}
run: |
mkdir -p "1.2"
for files in libtorrent-v1.2-*-qbittorrent-nox; do
cp -rf ${files}/* "1.2/"
for release in 1\.2/*-release.md 2\.0/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
- name: Host - 2.0 artifacts organise for release ${{ github.event.inputs.distinct_id }}
run: |
mkdir -p "2.0"
for files in libtorrent-v2.0-*-qbittorrent-nox; do
cp -rf ${files}/* "2.0/"
for dependency_version in 1\.2/*-dependency-version.json 2\.0/*-dependency-version.json; do
[[ -f "${dependency_version}" ]] && dependency_version+=("${dependency_version}")
done
- name: Host - merge release-info ${{ github.event.inputs.distinct_id }}
run: |
paste -d '\n' 1.2/qt5-*-release.md | uniq > 1.2/tmp-release.md
paste -d '\n' 2.0/qt6-*-release.md | uniq > 2.0/tmp-release.md
paste -d '\n' 1.2/tmp-release.md 2.0/tmp-release.md | uniq > tmp-release.md
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
readarray -t release_sorted < <(printf '%s\n' "${release[@]}" | sort)
readarray -t dependency_version_sorted < <(printf '%s\n' "${dependency_version[@]}" | sort)
paste -d '\n' 1.2/qt5-dependency-version.json 2.0/qt6-dependency-version.json | uniq > dependency-version.json
paste -d '\n' "${release_sorted[@]}" | uniq | awk '!(NF && seen[$0]++) || /^>/' > "tmp-release.md"
paste -d '\n' "${dependency_version_sorted[@]}" | uniq | awk '!(NF && seen[$0]++)' > "dependency-version.json"
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
- name: Host - Bootstrap release tag ${{ github.event.inputs.distinct_id }}
run: printf '%s\n' "release_tag=$(cat ${{ matrix.qbt_libtorrent_version }}/tag.md)" >> $GITHUB_ENV
Expand Down
Loading

0 comments on commit fa4d0df

Please sign in to comment.