Skip to content

Commit

Permalink
CI: naming fixes and add draft-release job.
Browse files Browse the repository at this point in the history
The 'draft-release' job runs on any tagged commit and creates a new
release, marked as draft, and containing an automatically generated
changelog.
  • Loading branch information
GPMueller committed Jul 6, 2021
1 parent d98c89e commit ce0082b
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -55,5 +55,33 @@ jobs:
python -m coverage run setup.py test
python -m coverage combine
- name: Upload coverage 👆
run: codecov
- 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

0 comments on commit ce0082b

Please sign in to comment.