diff --git a/.github/ISSUE_TEMPLATE/wiki-change-request.yml b/.github/ISSUE_TEMPLATE/wiki-change-request.yml new file mode 100644 index 00000000..622e701b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/wiki-change-request.yml @@ -0,0 +1,33 @@ +name: Wiki Change Request +description: want change? +labels: ["wiki change request"] +body: + - type: markdown + attributes: + value: | + Please read the following before you start filling out this form: + + * This form is for requesting changes to the Homebridge Organization wiki pages only. + - type: textarea + id: proposed-change + attributes: + label: Proposed Change + description: | + Please describe the change you would like to see made to the wiki page. + + If you are requesting a new page, please describe the page you would like to see created. + + placeholder: | + Tip: You can attach images or files by clicking this area to highlight it and then dragging files in. + validations: + required: true + - type: input + id: wiki-page + attributes: + label: Wiki Page Link + description: | + Please provide a link to the wiki page you would like to see changed. + + If you are requesting a new page, please provide details of where you would like to see this page linked from. + validations: + required: true diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000..78331e16 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,11 @@ +# Add 'beta' label to any PR where the base branch name starts with `beta` or has a `beta` section in the name +beta: + - base-branch: ['^beta', 'beta', 'beta*'] + +# Add 'beta' label to any PR where the base branch name starts with `beta` or has a `beta` section in the name +alpha: + - base-branch: ['^alpha', 'alpha', 'alpha*'] + +# Add 'latest' label to any PR where the base branch name starts with `latest` or has a `latest` section in the name +latest: + - base-branch: ['^latest', 'latest', 'latest*'] \ No newline at end of file diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..0dee4400 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,21 @@ +# The GitHub release configuration file: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes + +changelog: + categories: + - title: Breaking Changes 🛠 + labels: + - 'breaking change' + - title: Featured Changes ✨ + labels: + - 'feature' + - 'enhancement' + - title: Bug Fixes 🐛 + labels: + - 'fix' + - 'bugfix' + - 'bug' + - title: Other Changes + labels: + - "chore" + - "housekeeping" + - "*" diff --git a/.github/workflows/discord-webhooks.yml b/.github/workflows/discord-webhooks.yml deleted file mode 100644 index 973dee04..00000000 --- a/.github/workflows/discord-webhooks.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Discord Webhooks - -# Controls when the workflow will run -on: - release: - types: [released, prereleased] - -jobs: - github-releases-to-discord: - uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest - with: - footer_title: "Homebridge Docker" - secrets: - DISCORD_WEBHOOK_URL_LATEST: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }} - DISCORD_WEBHOOK_URL_BETA: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }} \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..e20474eb --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,12 @@ +name: Labeler + +on: + pull_request_target: # required for auto labeler + types: [opened, reopened, synchronize] + workflow_dispatch: + +jobs: + stale: + uses: homebridge/.github/.github/workflows/labeler.yml@latest + secrets: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e6cd2ad..d39650d8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -89,3 +89,38 @@ jobs: homebridge/homebridge:ubuntu homebridge/homebridge:${{ steps.image_tag.outputs.IMAGE_TAG }} + tag: + name: Verify Release Tag + runs-on: ubuntu-latest + outputs: + version: ${{ steps.get_version.outputs.version }} + steps: + - name: Get Release Tag + id: get_version + uses: jannemattila/get-version-from-tag@v3 + - name: Tag Info + run: | + echo "Release Tag: ${{github.ref}}" + echo "Latest Tag: ${{ steps.get_version.outputs.version }}" + - name: Tag Info Matches + if: endsWith(github.ref, steps.get_version.outputs.version ) + run: | + echo Latest Tag matches Release tag + - name: Tag Info Doesn't Match + if: ${{ !endsWith(github.ref, steps.get_version.outputs.version ) }} + run: | + echo Latest Tag does not matches Release tag + exit 1 + + github-releases-to-discord: + name: Discord Webhooks + needs: build + uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest + with: + title: "Homebridge Docker Release" + description: | + Version `${{ github.event.release.tag_name }}` + url: "https://github.com/homebridge/homebridge-docker/releases/tag/${{ github.event.release.tag_name }}" + secrets: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }} + diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 00000000..8b606ea0 --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,12 @@ +name: PR Labeler + +on: + pull_request: # required for auto labeler + types: [opened, reopened, synchronize] + workflow_dispatch: + +jobs: + stale: + uses: homebridge/.github/.github/workflows/pr-labeler.yml@latest + secrets: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-creator.yml b/.github/workflows/release-creator.yml new file mode 100644 index 00000000..b1802060 --- /dev/null +++ b/.github/workflows/release-creator.yml @@ -0,0 +1,38 @@ +name: Create Draft Release + +on: + push: + branches: [latest] + pull_request: # required for autolabeler + branches: [latest] + types: [opened, reopened, synchronize, ready_for_review, review_requested] + workflow_dispatch: + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - 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: ${{ steps.date.outputs.date }} + release_name: ${{ steps.date.outputs.date }} + body: | + Homebridge Apt Package Manifest + + | Package | Version | + |:-------:|:-------:| + |NodeJS| v*.*.* | + |Homebridge-Config-UI-X| *.*.* | + |Homebridge| *.*.* | + draft: true + prerelease: false