Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gh actions #74

Merged
merged 4 commits into from
Jan 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/code_quality_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ jobs:
name: runner / remark-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- if: github.event_name == 'push'
uses: actions/checkout@v2
- if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- uses: rickstaa/action-remark-lint@v1
id: remark_lint
with:
remark_args: ". -o"
remark_args: ". -o --ignore-pattern CHANGELOG.md"
- name: Annotate diff changes using reviewdog
if: github.event_name == 'pull_request' && steps.remark_lint.outputs.is_formatted == 'true'
uses: reviewdog/action-suggester@v1
Expand All @@ -53,6 +58,7 @@ jobs:
There appear to be some markdown formatting warning in ${{ github.sha }}. This pull request
uses the [remark-lint](https://github.com/remarkjs/remark-lint) linter to fix these issues.
branch: actions/code_quality_ci/remark-lint
delete-branch: true
labels: markdown
- name: Print pull request info
if: steps.black_format.outputs.is_formatted == 'true'
Expand All @@ -63,7 +69,12 @@ jobs:
name: runner / black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- if: github.event_name == 'push'
uses: actions/checkout@v2
- if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- uses: rickstaa/action-black@v1
id: black_format
with:
Expand Down Expand Up @@ -126,4 +137,4 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
level: warning
fail_on_error: true
fail_on_error: true
2 changes: 0 additions & 2 deletions .github/workflows/docs_publish_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ name: Docs CI
on:
release:
types: [released, prereleased]

jobs:
build-docs:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -50,7 +49,6 @@ jobs:
with:
name: html-docs
path: docs/build/html/

deploy-docs:
runs-on: ubuntu-latest
needs: build-docs
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/release-changelog-builder-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"categories": [
{
"title": "## 🚀 Features",
"labels": ["feature"]
},
{
"title": "## 🐛 Fixes",
"labels": ["fix"]
},
{
"title": "## 🧪 Tests",
"labels": ["test"]
},
{
"title": "## 📝 Tests",
"labels": ["docs"]
},
{
"title": "## 💚 CI",
"labels": ["CI"]
},
{
"title": "## 🔒 Security",
"labels": ["security"]
},
{
"title": "## 🔄 Dependency updates",
"labels": ["dependencies"]
}
]
}
17 changes: 5 additions & 12 deletions .github/workflows/release_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ name: MLC release CI
on:
push:
branches:
- master
- main
tags:
- 'v*.*.*'
- "v*.*.*"
pull_request:
types:
- labeled

jobs:
release:
if: github.event.action != 'labeled'
Expand All @@ -33,14 +32,12 @@ jobs:
submodules: recursive
token: ${{ secrets.GA_SUB }}
fetch-depth: 0

# Bump version on merging Pull Requests with specific labels.
# (bump:major,bump:minor,bump:patch)
- name: Bump version on merging Pull Requests with specific labels.
if: "!startsWith(github.ref, 'refs/tags/')"
id: bumpr
uses: haya14busa/action-bumpr@v1

# Update corresponding major and minor tag.
# e.g. Update v1 and v1.2 when releasing v1.2.3
- name: Update corresponding major and minor tag.
Expand All @@ -49,7 +46,6 @@ jobs:
with:
github_token: ${{ secrets.github_token }}
tag: ${{ steps.bumpr.outputs.next_version }}

# Use bumpversion to update version in code
# See. https://pypi.org/project/bump2version/
- name: Set up Python environment
Expand Down Expand Up @@ -83,11 +79,10 @@ jobs:
with:
branch: ${{ steps.get_ref.outputs.value }}
commit_message: ":bookmark: Updates documentation version to ${{ steps.get_setmver.outputs.current_version }}"

# Update CHANGELOG.md
- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: "12"
- name: Install auto-changelog
run: |
npm install -g auto-changelog
Expand All @@ -99,14 +94,13 @@ jobs:
with:
branch: ${{ steps.get_ref.outputs.value }}
commit_message: ":memo: Updates CHANGELOG.md"

# Create release changelog
- name: Build release changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@main
env:
configuration: ".github/workflows/configuration_complex.json"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Create pre-release with changelog
- name: Create pre-release
uses: actions/create-release@v1
Expand All @@ -117,11 +111,10 @@ jobs:
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-check:
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Post bumpr status comment
uses: haya14busa/action-bumpr@v1
uses: haya14busa/action-bumpr@v1