From 23728987dfac6e2bb8ea94439c2e63a7d9adea82 Mon Sep 17 00:00:00 2001 From: "tier4-autoware-public-bot[bot]" <98652886+tier4-autoware-public-bot[bot]@users.noreply.github.com> Date: Sat, 23 Apr 2022 02:38:45 +0000 Subject: [PATCH 1/8] chore: sync files (#67) * chore: sync files Signed-off-by: GitHub * Update sync-files.yaml * Delete cliff.toml Co-authored-by: kenji-miyake Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> --- .github/sync-files.yaml | 6 +-- .github/workflows/github-release.yaml | 38 ++++++++++++++- cliff.toml | 68 --------------------------- 3 files changed, 37 insertions(+), 75 deletions(-) delete mode 100644 cliff.toml diff --git a/.github/sync-files.yaml b/.github/sync-files.yaml index 3c2fc81..6c9c470 100644 --- a/.github/sync-files.yaml +++ b/.github/sync-files.yaml @@ -1,6 +1,7 @@ - repository: autowarefoundation/autoware files: - source: .github/dependabot.yaml + - source: .github/workflows/github-release.yaml - source: .github/workflows/pre-commit.yaml - source: .github/workflows/pre-commit-optional.yaml - source: .github/workflows/semantic-pull-request.yaml @@ -13,8 +14,3 @@ - source: .prettierignore - source: .prettierrc.yaml - source: .yamllint.yaml - -- repository: autowarefoundation/autoware-github-actions - files: - - source: .github/workflows/github-release.yaml - - source: cliff.toml diff --git a/.github/workflows/github-release.yaml b/.github/workflows/github-release.yaml index 52475f2..7bb9d70 100644 --- a/.github/workflows/github-release.yaml +++ b/.github/workflows/github-release.yaml @@ -2,17 +2,50 @@ name: github-release on: push: + branches: + - beta/v* tags: - v* + workflow_dispatch: + inputs: + beta-branch-or-tag-name: + type: string + required: true jobs: github-release: runs-on: ubuntu-latest steps: + - name: Set tag name + id: set-tag-name + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + REF_NAME="${{ github.event.inputs.beta-branch-or-tag-name }}" + else + REF_NAME="${{ github.ref_name }}" + fi + + echo ::set-output name=ref-name::"$REF_NAME" + echo ::set-output name=tag-name::"${REF_NAME#beta/}" + - name: Check out repository uses: actions/checkout@v3 with: fetch-depth: 0 + ref: ${{ steps.set-tag-name.outputs.ref-name }} + + - name: Set target name for beta branches + id: set-target-name + run: | + if [[ "${{ steps.set-tag-name.outputs.ref-name }}" =~ "beta/" ]]; then + echo ::set-output name=target-name::"${{ steps.set-tag-name.outputs.ref-name }}" + fi + + - name: Create a local tag for beta branches + run: | + if [ "${{ steps.set-target-name.outputs.target-name }}" != "" ]; then + git tag "${{ steps.set-tag-name.outputs.tag-name }}" + fi - name: Run generate-changelog id: generate-changelog @@ -20,9 +53,10 @@ jobs: - name: Release to GitHub run: | - gh release create "${{ github.ref_name }}" \ + gh release create "${{ steps.set-tag-name.outputs.tag-name }}" \ --draft \ - --title "Release ${{ github.ref_name }}" \ + --target "${{ steps.set-target-name.outputs.target-name }}" \ + --title "Release ${{ steps.set-tag-name.outputs.tag-name }}" \ --notes "$NOTES" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/cliff.toml b/cliff.toml deleted file mode 100644 index 339e48e..0000000 --- a/cliff.toml +++ /dev/null @@ -1,68 +0,0 @@ -# configuration file for git-cliff (0.1.0) - -[changelog] -# changelog header -header = """ -# Changelog\n -All notable changes to this project will be documented in this file.\n -""" -# template for the changelog body -# https://tera.netlify.app/docs/#introduction -body = """ -{% if version %}\ - ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} -{% else %}\ - ## [unreleased] -{% endif %}\ -{% for group, commits in commits | group_by(attribute="group") %} - ### {{ group | upper_first }} - {% for commit in commits %} - {% if commit.scope %}\ - - [{{ commit.scope }}] {{ commit.message | upper_first }}\ - {% else %}\ - - {{ commit.message | upper_first }}\ - {% endif %}\ - {% endfor %} -{% endfor %}\n -""" -# remove the leading and trailing whitespace from the template -trim = true -# changelog footer -footer = """ - -""" - -[git] -# allow only conventional commits -# https://www.conventionalcommits.org -conventional_commits = true -# regex for parsing and grouping commits -commit_parsers = [ - # Skip - { message = "^chore\\(release\\)", skip = true}, - # Comply with https://github.com/commitizen/conventional-commit-types/blob/c3a9be4c73e47f2e8197de775f41d981701407fb/index.json - # Why adding numbers to groups is in https://github.com/orhun/git-cliff/issues/9#issuecomment-914521594 - { message = "^feat", group = "Features"}, - { message = "^fix", group = "Bug Fixes"}, - { message = "^doc", group = "Documentation"}, - { message = "^style", group = "Styles"}, - { message = "^refactor", group = "Code Refactoring"}, - { message = "^perf", group = "Performance Improvements"}, - { message = "^test", group = "Tests"}, - { message = "^build", group = "Builds"}, - { message = "^ci", group = "Continuous Integrations"}, - { message = "^chore", group = "Chores"}, - { message = "^revert", group = "Reverts"}, -] -# filter out the commits that are not matched by commit parsers -filter_commits = false -# glob pattern for matching git tags -tag_pattern = "v[0-9]*.[0-9]*.[0-9]*" -# regex for skipping tags -skip_tags = "v0.0.0" -# regex for ignoring tags -ignore_tags = "v.*-beta.*" -# sort the tags chronologically -date_order = false -# sort the commits inside sections by oldest/newest order -sort_commits = "oldest" From 9e9e6fb1cd25bf7fedaffa5ec4828a9f863ade8f Mon Sep 17 00:00:00 2001 From: "tier4-autoware-public-bot[bot]" <98652886+tier4-autoware-public-bot[bot]@users.noreply.github.com> Date: Tue, 26 Apr 2022 10:12:05 +0900 Subject: [PATCH 2/8] chore: sync files (#68) Signed-off-by: GitHub Co-authored-by: kenji-miyake --- .github/workflows/sync-files.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/sync-files.yaml b/.github/workflows/sync-files.yaml index 69ef19c..b9dc590 100644 --- a/.github/workflows/sync-files.yaml +++ b/.github/workflows/sync-files.yaml @@ -6,7 +6,14 @@ on: workflow_dispatch: jobs: + check-secret: + uses: autowarefoundation/autoware-github-actions/.github/workflows/check-secret.yaml@v1 + secrets: + secret: ${{ secrets.APP_ID }} + sync-files: + needs: check-secret + if: ${{ needs.check-secret.outputs.set == 'true' }} runs-on: ubuntu-latest steps: - name: Generate token From 06e2a499b168861d675d5d5a352a11439bebdeb3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 26 Apr 2022 10:12:22 +0900 Subject: [PATCH 3/8] ci(pre-commit): autoupdate (#66) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-clang-format: v13.0.1 → v14.0.1](https://github.com/pre-commit/mirrors-clang-format/compare/v13.0.1...v14.0.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 131c0e0..67d537f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -72,7 +72,7 @@ repos: ] - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v13.0.1 + rev: v14.0.1 hooks: - id: clang-format types_or: [c++, c, cuda] From 63fc867770de3ff94d2074d24fceae5d6773ac54 Mon Sep 17 00:00:00 2001 From: "tier4-autoware-public-bot[bot]" <98652886+tier4-autoware-public-bot[bot]@users.noreply.github.com> Date: Tue, 3 May 2022 13:40:57 +0900 Subject: [PATCH 4/8] chore: sync files (#69) Signed-off-by: GitHub Co-authored-by: kenji-miyake --- .github/workflows/github-release.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yaml b/.github/workflows/github-release.yaml index 7bb9d70..23508e6 100644 --- a/.github/workflows/github-release.yaml +++ b/.github/workflows/github-release.yaml @@ -51,9 +51,23 @@ jobs: id: generate-changelog uses: autowarefoundation/autoware-github-actions/generate-changelog@v1 + - name: Select verb + id: select-verb + run: | + has_previous_draft=$(gh release view --json isDraft -q ".isDraft" "${{ steps.set-tag-name.outputs.tag-name }}") + + verb=create + if [ "$has_previous_draft" = "true" ]; then + verb=edit + fi + + echo ::set-output name=verb::"$verb" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Release to GitHub run: | - gh release create "${{ steps.set-tag-name.outputs.tag-name }}" \ + gh release ${{ steps.select-verb.outputs.verb }} "${{ steps.set-tag-name.outputs.tag-name }}" \ --draft \ --target "${{ steps.set-target-name.outputs.target-name }}" \ --title "Release ${{ steps.set-tag-name.outputs.tag-name }}" \ From 980b659dda2e9e9041099f33baab71e0582b7171 Mon Sep 17 00:00:00 2001 From: "tier4-autoware-public-bot[bot]" <98652886+tier4-autoware-public-bot[bot]@users.noreply.github.com> Date: Thu, 12 May 2022 10:21:21 +0900 Subject: [PATCH 5/8] chore: sync files (#70) Signed-off-by: GitHub Co-authored-by: kenji-miyake --- .github/workflows/github-release.yaml | 2 +- .markdown-link-check.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yaml b/.github/workflows/github-release.yaml index 23508e6..93533b5 100644 --- a/.github/workflows/github-release.yaml +++ b/.github/workflows/github-release.yaml @@ -54,7 +54,7 @@ jobs: - name: Select verb id: select-verb run: | - has_previous_draft=$(gh release view --json isDraft -q ".isDraft" "${{ steps.set-tag-name.outputs.tag-name }}") + has_previous_draft=$(gh release view --json isDraft -q ".isDraft" "${{ steps.set-tag-name.outputs.tag-name }}") || true verb=create if [ "$has_previous_draft" = "true" ]; then diff --git a/.markdown-link-check.json b/.markdown-link-check.json index 331095d..dec3db1 100644 --- a/.markdown-link-check.json +++ b/.markdown-link-check.json @@ -3,6 +3,9 @@ "ignorePatterns": [ { "pattern": "^http://localhost" + }, + { + "pattern": "^https://github.com/.*/discussions/new" } ], "retryOn429": true, From 7e71abdc50bb9d2de53a669735c5f83884b17696 Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Sun, 22 May 2022 01:53:01 +0900 Subject: [PATCH 6/8] chore: specify versions of flake8 plugins (#73) Signed-off-by: Kenji Miyake --- .pre-commit-hooks.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 9592f97..9f7f718 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -9,14 +9,14 @@ additional_dependencies: [ flake8==4.0.1, - flake8-blind-except, - flake8-builtins, - flake8-class-newline, - flake8-comprehensions, - flake8-deprecated, - flake8-docstrings, - flake8-import-order, - flake8-quotes, + flake8-blind-except==0.2.1, + flake8-builtins==1.5.3, + flake8-class-newline==1.6.0, + flake8-comprehensions==3.10.0, + flake8-deprecated==1.3, + flake8-docstrings==1.6.0, + flake8-import-order==0.18.1, + flake8-quotes==3.3.1, ] - id: prettier-xacro From 0c8e3afaed5ec6406e39decb38171086a1e14262 Mon Sep 17 00:00:00 2001 From: "tier4-autoware-public-bot[bot]" <98652886+tier4-autoware-public-bot[bot]@users.noreply.github.com> Date: Sun, 22 May 2022 01:53:14 +0900 Subject: [PATCH 7/8] chore: sync files (#72) Signed-off-by: GitHub Co-authored-by: kenji-miyake --- .github/workflows/github-release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github-release.yaml b/.github/workflows/github-release.yaml index 93533b5..19e1e9c 100644 --- a/.github/workflows/github-release.yaml +++ b/.github/workflows/github-release.yaml @@ -9,6 +9,7 @@ on: workflow_dispatch: inputs: beta-branch-or-tag-name: + description: The name of the beta branch or tag to release type: string required: true From ca5e2bdba868d6d2a0eb42d1f79b9e120fe467f6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 22 May 2022 01:53:31 +0900 Subject: [PATCH 8/8] ci(pre-commit): autoupdate (#71) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-clang-format: v14.0.1 → v14.0.3](https://github.com/pre-commit/mirrors-clang-format/compare/v14.0.1...v14.0.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 67d537f..75bc921 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -72,7 +72,7 @@ repos: ] - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v14.0.1 + rev: v14.0.3 hooks: - id: clang-format types_or: [c++, c, cuda]