From 582bd9edf4b86b1acc1e4ac4e2bf349e94f248cc Mon Sep 17 00:00:00 2001 From: Edwin van de Pol Date: Wed, 11 Sep 2024 21:49:15 +0200 Subject: [PATCH] Updated workflows --- .github/workflows/release.yml | 58 ++++++++++++++++++++++++++++++++++ .github/workflows/validate.yml | 7 ++-- 2 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5ef5a28 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,58 @@ +name: Release + +on: + workflow_dispatch: + inputs: + version: + type: choice + description: Version + required: true + default: patch + options: + - major + - minor + - patch + changelog: + type: string + description: Changelog + required: true + +jobs: + main: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Update version + uses: athombv/github-action-homey-app-version@master + id: update_version + with: + version: ${{ inputs.version }} + changelog: ${{ inputs.changelog }} + + - name: Commit version + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Version ${{ steps.update_version.outputs.version }} + tagging_message: v${{ steps.update_version.outputs.version }} + + - name: Publish + uses: athombv/github-action-homey-app-publish@master + id: publish + with: + personal_access_token: ${{ secrets.HOMEY_PAT }} + + - name: Summary + run: echo "Release can be managed at ${{ steps.publish.outputs.url }}" >> $GITHUB_STEP_SUMMARY + + - name: Release + uses: softprops/action-gh-release@v2 + with: + body: ${{ inputs.changelog }} + make_latest: true + tag_name: v${{ steps.update_version.outputs.version }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 123d22a..8122afb 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,4 +1,4 @@ -name: Validate Homey App +name: Validate on: workflow_dispatch: @@ -8,10 +8,11 @@ on: jobs: main: runs-on: ubuntu-latest - name: Validate Homey App steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 + - uses: athombv/github-action-homey-app-validate@master with: level: verified