From b2980736001f4a3b747ed6e05349bbcc9ceae112 Mon Sep 17 00:00:00 2001 From: idaho <664101+idaho@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:12:44 +0100 Subject: [PATCH] Cleanup workflows (#126) * use softprops/action-gh-release for creating a release * add issue templates * update dependabot settings * update bug issue template * use secret token --- .github/ISSUE_TEMPLATE/bug.yaml | 70 +++++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yaml | 1 + .github/ISSUE_TEMPLATE/feature.yaml | 41 +++++++++++++++++ .github/dependabot.yml | 3 ++ .github/workflows/release.yaml | 38 ++++++++-------- 5 files changed, 133 insertions(+), 20 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug.yaml create mode 100644 .github/ISSUE_TEMPLATE/config.yaml create mode 100644 .github/ISSUE_TEMPLATE/feature.yaml diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml new file mode 100644 index 0000000..a4b327c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -0,0 +1,70 @@ +name: 🐞 Bug Report +description: Create a report to help us improve +title: "[Bug]: " +labels: ["bug"] +body: + - type: checkboxes + attributes: + label: Requirements + options: + - label: I checked the troubleshooting section in the README to verify that I have the latest TrashCard version. + required: true + - label: I did a search to see if there is a similar issue or if a pull request is open. + required: true + - type: textarea + attributes: + label: Current Behavior + description: A concise description of what you're experiencing. + validations: + required: false + - type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you expected to happen. + validations: + required: false + - type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. In this environment... + 2. With this config... + 3. Run '...' + 4. See error... + validations: + required: false + - type: textarea + attributes: + label: Context + description: | + If your issue is about a certain type of entity, please provide the entity state/attribute. You can find it in the [developer tools](https://my.home-assistant.io/redirect/developer_states/). Otherwise, you can leave this section blank. + value: | + YAML state + ```yaml + + ``` + validations: + required: false + - type: textarea + attributes: + label: Environment + description: | + examples: + - **Brower**: Chrome + - **HA Version**: 2022.11.0 + - **TrashCard**: 1.3.0 + value: | + - Browser: + - HA Version: + - TrashCard: + render: markdown + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 0000000..ec4bb38 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1 @@ +blank_issues_enabled: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature.yaml b/.github/ISSUE_TEMPLATE/feature.yaml new file mode 100644 index 0000000..cd6422d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yaml @@ -0,0 +1,41 @@ +name: 🚀 Feature request +description: Suggest an idea for this project +title: "[Feature]: <title>" +labels: ["feature"] +body: + - type: checkboxes + attributes: + label: Requirements + options: + - label: I have updated Mushroom to the latest available version + required: true + - label: I did a search to see if there is a similar issue or if a pull request is open. + required: true + - type: textarea + attributes: + label: Is your feature request related to a problem? + description: > + A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + validations: + required: true + - type: textarea + attributes: + label: Describe the solution you'd like + description: > + A clear and concise description of what you want to happen. + validations: + required: true + - type: textarea + attributes: + label: Describe alternatives you've considered + description: > + A clear and concise description of any alternative solutions or features you've considered. + - type: textarea + attributes: + label: Additional context + description: > + Add any other context or screenshots about the feature request. + - type: markdown + attributes: + value: > + Thanks for contributing 🎉 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d17eb51..49243f5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,6 +10,9 @@ updates: - "idaho" reviewers: - "idaho" + commit-message: + prefix: "fix" + prefix-development: "chore" labels: - "dependencies" pull-request-branch-name: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 88a4194..6a4a93e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,25 +1,23 @@ name: Release - -on: workflow_dispatch - +on: + push: + tags: + - "*.*.*" jobs: release: - name: Release runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: 18.x - - name: Install dependencies - run: | - npm install - - name: Building - run: | - npm run build - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.SEMANTIC_TOKEN }} - run: npx semantic-release \ No newline at end of file + - name: Checkout + uses: actions/checkout@v2 + - name: Install + run: npm ci + - name: Build + run: npm run build + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + draft: true + generate_release_notes: true + token: ${{ secrets.HASSIO_RELEASE_ACTION }} + files: dist/*.js \ No newline at end of file