From ca563f7b2d52b86fab4b7edc8be22e53e1b780ef Mon Sep 17 00:00:00 2001 From: rickstaa Date: Sat, 9 Jan 2021 21:55:29 +0100 Subject: [PATCH 1/4] :bug: Fixes mac github action name --- .github/workflows/mac_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mac_ci.yml b/.github/workflows/mac_ci.yml index f78355b1f..86833da67 100644 --- a/.github/workflows/mac_ci.yml +++ b/.github/workflows/mac_ci.yml @@ -1,5 +1,5 @@ # Makes sure the package build on linux. -name: Linux CI +name: Mac CI on: push: branches: From f14655e98fdafc4025ed05b8b8d397d880fc95a2 Mon Sep 17 00:00:00 2001 From: rickstaa Date: Sat, 9 Jan 2021 21:58:29 +0100 Subject: [PATCH 2/4] :art: Improves gh-action code formatting --- .github/workflows/docs_publish_ci.yml | 2 -- .github/workflows/release_ci.yml | 7 ------- 2 files changed, 9 deletions(-) diff --git a/.github/workflows/docs_publish_ci.yml b/.github/workflows/docs_publish_ci.yml index 1c0f66478..28536bf3c 100644 --- a/.github/workflows/docs_publish_ci.yml +++ b/.github/workflows/docs_publish_ci.yml @@ -4,7 +4,6 @@ name: Docs CI on: release: types: [released, prereleased] - jobs: build-docs: runs-on: ubuntu-latest @@ -50,7 +49,6 @@ jobs: with: name: html-docs path: docs/build/html/ - deploy-docs: runs-on: ubuntu-latest needs: build-docs diff --git a/.github/workflows/release_ci.yml b/.github/workflows/release_ci.yml index 00e78abc9..21c23082d 100644 --- a/.github/workflows/release_ci.yml +++ b/.github/workflows/release_ci.yml @@ -33,14 +33,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. @@ -49,7 +47,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 @@ -83,7 +80,6 @@ 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: @@ -99,14 +95,12 @@ 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: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Create pre-release with changelog - name: Create pre-release uses: actions/create-release@v1 @@ -117,7 +111,6 @@ jobs: prerelease: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - release-check: if: github.event.action == 'labeled' runs-on: ubuntu-latest From fe30484a78b947d8b93b331745855622e022401c Mon Sep 17 00:00:00 2001 From: rickstaa Date: Sat, 9 Jan 2021 22:23:35 +0100 Subject: [PATCH 3/4] :green_heart: Fixes pull request codeQuality gh action This commit fixes a bug in the code_quality_ci action which caused any pull requests created by the action to fail if a commit was pushed to the pull request (see https://github.com/peter-evans/create-pull-request/issues/660 for more info). --- .github/workflows/code_quality_ci.yml | 17 ++++++++++--- .../release-changelog-builder-config.json | 24 +++++++++++++++++++ .github/workflows/release_ci.yml | 7 +++--- 3 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/release-changelog-builder-config.json diff --git a/.github/workflows/code_quality_ci.yml b/.github/workflows/code_quality_ci.yml index a7b119562..40ba9d77d 100644 --- a/.github/workflows/code_quality_ci.yml +++ b/.github/workflows/code_quality_ci.yml @@ -32,7 +32,12 @@ 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: @@ -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' @@ -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: @@ -126,4 +137,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} reporter: github-check level: warning - fail_on_error: true \ No newline at end of file + fail_on_error: true diff --git a/.github/workflows/release-changelog-builder-config.json b/.github/workflows/release-changelog-builder-config.json new file mode 100644 index 000000000..550b9cffa --- /dev/null +++ b/.github/workflows/release-changelog-builder-config.json @@ -0,0 +1,24 @@ +{ + "categories": [ + { + "title": "## ๐Ÿš€ Features", + "labels": ["feature"] + }, + { + "title": "## ๐Ÿ› Fixes", + "labels": ["fix"] + }, + { + "title": "## ๐Ÿงช Tests", + "labels": ["test"] + }, + { + "title": "## ๐Ÿ“ Tests", + "labels": ["docs"] + }, + { + "title": "## ๐Ÿ’š CI", + "labels": ["CI"] + } + ] +} diff --git a/.github/workflows/release_ci.yml b/.github/workflows/release_ci.yml index 21c23082d..f083aaa01 100644 --- a/.github/workflows/release_ci.yml +++ b/.github/workflows/release_ci.yml @@ -7,7 +7,7 @@ on: branches: - master tags: - - 'v*.*.*' + - "v*.*.*" pull_request: types: - labeled @@ -83,7 +83,7 @@ jobs: # 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 @@ -100,6 +100,7 @@ jobs: 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 @@ -117,4 +118,4 @@ jobs: steps: - uses: actions/checkout@v2 - name: Post bumpr status comment - uses: haya14busa/action-bumpr@v1 \ No newline at end of file + uses: haya14busa/action-bumpr@v1 From 7737b99ac981c1b53b90f6aa5330f620d0ed978c Mon Sep 17 00:00:00 2001 From: rickstaa Date: Sat, 9 Jan 2021 22:30:19 +0100 Subject: [PATCH 4/4] :green_heart: Updates changelog-build action config file --- .github/workflows/release-changelog-builder-config.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release-changelog-builder-config.json b/.github/workflows/release-changelog-builder-config.json index 550b9cffa..d47a5cb50 100644 --- a/.github/workflows/release-changelog-builder-config.json +++ b/.github/workflows/release-changelog-builder-config.json @@ -19,6 +19,14 @@ { "title": "## ๐Ÿ’š CI", "labels": ["CI"] + }, + { + "title": "## ๐Ÿ”’ Security", + "labels": ["security"] + }, + { + "title": "## ๐Ÿ”„ Dependency updates", + "labels": ["dependencies"] } ] }