1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
name: Draft new release
on:
push:
tags:
- 'v1.[0-9]+'
permissions:
contents: write
packages: write
jobs:
draft-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Setup
run: |
sudo apt update
sudo apt install -y libboost-dev tofrodos
./autogen.sh
./configure
- name: Make tarballs
run: |
mkdir tarballs
make dist
mv QuantLib-*.tar.gz tarballs
cd tarballs && ../tools/tgz2zip *.tar.gz && ls -lh
- name: Extract version
run: |
echo ${{ github.ref_name }} | awk -F '[v-]' '{ print "VERSION_NUMBER=" $2 }' | tee -a $GITHUB_ENV
- name: Prepare release notes
run: |
echo "Downloads:" >> tarballs/notes.txt
echo "==========" >> tarballs/notes.txt
echo "" >> tarballs/notes.txt
echo "- [QuantLib-${VERSION_NUMBER}.tar.gz](https://github.com/lballabio/QuantLib/releases/download/v${VERSION_NUMBER}/QuantLib-${VERSION_NUMBER}.tar.gz)" >> tarballs/notes.txt
echo "- [QuantLib-${VERSION_NUMBER}.zip](https://github.com/lballabio/QuantLib/releases/download/v${VERSION_NUMBER}/QuantLib-${VERSION_NUMBER}.zip)" >> tarballs/notes.txt
echo "" >> tarballs/notes.txt
awk '/Full list of pull requests/{ exit } { print }' News.md >> tarballs/notes.txt
- name: Create draft release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create ${{ github.ref_name }} \
--title "${VERSION_NUMBER}" \
--draft \
--notes-file tarballs/notes.txt \
--generate-notes \
tarballs/*.tar.gz tarballs/*.zip
reference-manual:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Setup
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: |
brew install automake autoconf libtool boost doxygen graphviz
- name: Doxygen version
run: |
doxygen --version
- name: Generate docs
run: |
./autogen.sh
./configure --with-boost-include=$(brew --prefix)/include
make docs
- uses: actions/checkout@v6
with:
repository: quantlib/quantlib.github.io
path: site
- name: Update docs
working-directory: site
run: |
rm -rf reference
mv ../Docs/html reference
git add reference
cp ../LICENSE.TXT _includes/LICENSE.TXT
- uses: peter-evans/create-pull-request@v8
with:
path: site
token: ${{ secrets.MACHINE_ACCOUNT_PAT }}
push-to-fork: ${{ vars.MACHINE_ACCOUNT }}/quantlib.github.io
branch: reference-docs-${{ github.ref_name }}
delete-branch: true
commit-message: 'Update reference docs for ${{ github.ref_name }}'
title: 'Update reference docs for ${{ github.ref_name }}'
author: lballabio[bot] <224797326+lballabio-bot@users.noreply.github.com>
body: |
This is an automated PR generated by the [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action.
|