-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eab6d66
commit 9e95c4e
Showing
3 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: CI - Changelog | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
changelog_prerelease: | ||
name: Update Changelog For Prerelease | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- name: Update Changelog | ||
uses: heinrichreimer/github-changelog-generator-action@v2.1.1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
issues: true | ||
issuesWoLabels: true | ||
pullRequests: false | ||
prWoLabels: false | ||
unreleased: true | ||
addSections: '{"documentation":{"prefix":"**Documentation:**","labels":["documentation"]}}' | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Update Changelog for PR | ||
file_pattern: CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Publish docs via GitHub Pages on release | ||
on: | ||
workflow_run: | ||
workflows: ["Release"] | ||
types: | ||
- completed | ||
env: | ||
PYTHON_VERSION: 3.x | ||
POETRY_VERSION: 1.1.4 | ||
|
||
jobs: | ||
documentation: | ||
name: Build documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python runtime | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Python Poetry Action | ||
uses: abatilo/actions-poetry@v2.1.0 | ||
with: | ||
poetry-version: ${{ env.POETRY_VERSION }} | ||
|
||
- name: View poetry version | ||
run: poetry --version | ||
|
||
- name: Install project dependencies | ||
run: poetry install | ||
|
||
- name: Deploy documentation | ||
env: | ||
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} | ||
run: | | ||
poetry run mkdocs gh-deploy --force | ||
poetry run mkdocs --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
changelog: | ||
name: Update Changelog | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get version from tag | ||
env: | ||
GITHUB_REF: ${{ github.ref }} | ||
run: | | ||
export CURRENT_VERSION=${GITHUB_TAG/refs\/tags\/v/} | ||
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- name: Update Changelog | ||
uses: heinrichreimer/github-changelog-generator-action@v2.1.1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
issues: true | ||
issuesWoLabels: true | ||
pullRequests: true | ||
prWoLabels: true | ||
addSections: '{"documentation":{"prefix":"**Documentation:**","labels":["documentation"]}}' | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Update Changelog for tag ${{ env.CURRENT_VERSION }} | ||
file_pattern: CHANGELOG.md | ||
|
||
release_notes: | ||
name: Create Release Notes | ||
runs-on: ubuntu-latest | ||
needs: changelog | ||
steps: | ||
- name: Get version from tag | ||
env: | ||
GITHUB_REF: ${{ github.ref }} | ||
run: | | ||
export CURRENT_VERSION=${GITHUB_TAG/refs\/tags\/v/} | ||
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
|
||
- name: Get Changelog Entry | ||
id: changelog_reader | ||
uses: mindsers/changelog-reader-action@v1 | ||
with: | ||
version: ${{ env.CURRENT_VERSION }} | ||
path: ./CHANGELOG.md | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: ${{ steps.changelog_reader.outputs.log_entry }} | ||
draft: false | ||
prerelease: false |