diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe40daa..5f8d39b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,34 +18,34 @@ jobs: with: python-version: '3.8' - - name: Install LLVM (Ubuntu) ๐Ÿ“š + - name: ๐Ÿ“š Install LLVM (Ubuntu) if: matrix.os == 'ubuntu-20.04' shell: bash run: | sudo apt update sudo apt install --fix-broken libc++-dev llvm clang libomp-dev - - name: Install LLVM (MacOS) ๐Ÿ“š + - name: ๐Ÿ“š Install LLVM (MacOS) if: matrix.os == 'macos-latest' shell: bash run: | brew update brew install llvm - - name: Install LLVM (Windows) book ๐Ÿ“š + - name: ๐Ÿ“š nstall LLVM (Windows) if: matrix.os == 'windows-latest' shell: pwsh run: | Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) choco install llvm - - name: Install clang-build โš™ + - name: โš™ Install clang-build run: | pip install setuptools pip install codecov python setup.py develop - - name: Run tests ๐Ÿงช + - name: ๐Ÿงช Run tests shell: bash run: | if [ ${{ matrix.os == 'macos-latest' }} ]; then export PATH=/usr/local/opt/llvm/bin:$PATH; fi @@ -55,5 +55,33 @@ jobs: python -m coverage run setup.py test python -m coverage combine - - name: Upload coverage ๐Ÿ‘† - run: codecov \ No newline at end of file + - name: ๐Ÿ‘† Upload coverage + run: codecov + + draft-release: + if: github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' ) + needs: [test] + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v2 + + - name: ๐Ÿ“„ Generate a changelog + id: changelog + uses: metcalfc/changelog-generator@v1.0.0 + with: + myToken: ${{ secrets.GITHUB_TOKEN }} + + - name: ๐Ÿ“„ Print the changelog + run: echo "${{ steps.changelog.outputs.changelog }}" + + - name: ๐ŸŽ‰ Create draft release + id: draft_release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: ${{ steps.changelog.outputs.changelog }} + draft: true \ No newline at end of file