From d244ab9cb2af9b0d14e1ac1c01fefbc76d64af29 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Wed, 13 Jul 2022 13:40:23 -0700 Subject: [PATCH 1/4] Add license + basic doc --- LICENSE | 21 +++++++++++++++++++++ README.md | 14 ++++++++++++-- action.yml | 14 +++++++------- 3 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8c9e791 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 GitHub, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 8446a37..d672d00 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ -# configure-pages +# Configure-Pages -An action to enable Pages and extract metadata. +An action to enable Pages and extract various metadata about a site. It can also be used to configure various static site generators we support as [starter workflows][starter-workflows]. +# Usage + +See [action.yml](action.yml) # Release instructions @@ -19,3 +22,10 @@ In order to release a new version of this Action: 3. Publish the draft release (the major tag such as `v0` will be created/updated by the [`release` workflow](release.yml)) ⚠️ Environment approval is required. + +# License + +The scripts and documentation in this project are released under the [MIT License](LICENSE). + + +[starter-workflows]: https://github.com/actions/starter-workflows/tree/main/pages \ No newline at end of file diff --git a/action.yml b/action.yml index b2332db..7e11cf5 100644 --- a/action.yml +++ b/action.yml @@ -1,14 +1,14 @@ -name: 'Get the Pages base URL' -description: 'Get the base URL where the GitHub Pages site will be hosted' +name: "Configure Pages" +description: "An action to enable Pages and extract various metadata about a site. It can also be used to configure various static site generators we support as starter workflows." runs: - using: 'node16' - main: 'dist/index.js' + using: "node16" + main: "dist/index.js" inputs: - static_site_generator: - description: 'static site generator types. We currently support nuxt, next and gatsby' + static_site_generator: + description: "Optional static site generator to attempt to configure (nuxt, next or gatsby)" required: false token: - description: 'GitHub token' + description: "GitHub token" default: ${{ github.token }} required: true outputs: From 47a8681e28ed65ff2f84d8dfa838730359a25db6 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Wed, 13 Jul 2022 13:41:28 -0700 Subject: [PATCH 2/4] Add CODEOWNERS too --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..cc1fef2 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Default PR reviewers +* @actions/pages From 188b08bec2a8a1ede537378b0de9d28cbeb9a79f Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Wed, 13 Jul 2022 13:44:27 -0700 Subject: [PATCH 3/4] Fix links --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d672d00..4ab9d32 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ An action to enable Pages and extract various metadata about a site. It can also # Usage -See [action.yml](action.yml) +See [action.yml](action.yml) and the [Pages starter workflows][starter-workflows]. # Release instructions In order to release a new version of this Action: -1. Locate the semantic version of the upcoming release (a draft is maintained by the [`draft-release` workflow](draft-release.yml)) +1. Locate the semantic version of the upcoming release (a draft is maintained by the [`draft-release` workflow][draft-release]) 2. Push a matching tag, for instance for `v0.1.0`: @@ -19,7 +19,7 @@ In order to release a new version of this Action: git push origin v0.1.0 ``` -3. Publish the draft release (the major tag such as `v0` will be created/updated by the [`release` workflow](release.yml)) +3. Publish the draft release (the major tag such as `v0` will be created/updated by the [`release` workflow][release]) ⚠️ Environment approval is required. @@ -28,4 +28,6 @@ In order to release a new version of this Action: The scripts and documentation in this project are released under the [MIT License](LICENSE). -[starter-workflows]: https://github.com/actions/starter-workflows/tree/main/pages \ No newline at end of file +[starter-workflows]: https://github.com/actions/starter-workflows/tree/main/pages +[draft-release]: .github/workflows/draft-release.yml +[release]: .github/workflows/release.yml \ No newline at end of file From d86acb4af5662fb88f247b4e26a3bc478b6390cc Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Wed, 13 Jul 2022 13:52:35 -0700 Subject: [PATCH 4/4] Add release drafter configuration --- .github/release-drafter.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..2735ea1 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,40 @@ +--- +name-template: "v$RESOLVED_VERSION" +tag-template: "v$RESOLVED_VERSION" +template: | + # Changelog + + $CHANGES + + See details of [all code changes](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION) since previous release. +categories: + - title: "🚀 Features" + labels: + - "feature" + - "enhancement" + - title: "🐛 Bug Fixes" + labels: + - "fix" + - "bugfix" + - "bug" + - title: "🧰 Maintenance" + labels: + - "infrastructure" + - "automation" + - "documentation" + - title: "🏎 Performance" + label: "performance" +change-template: "- $TITLE @$AUTHOR (#$NUMBER)" +version-resolver: + major: + labels: + - "type: breaking" + minor: + labels: + - "type: enhancement" + patch: + labels: + - "type: bug" + - "type: maintenance" + - "type: documentation" + default: patch