From 1332b68ff63436a79505e4e24785fc1832f5275c Mon Sep 17 00:00:00 2001 From: David Rapan Date: Tue, 11 Feb 2025 15:34:38 +0100 Subject: [PATCH] chore: Remove unused workflow --- .github/workflows/bump.yaml | 56 ------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 .github/workflows/bump.yaml diff --git a/.github/workflows/bump.yaml b/.github/workflows/bump.yaml deleted file mode 100644 index 00f7216a..00000000 --- a/.github/workflows/bump.yaml +++ /dev/null @@ -1,56 +0,0 @@ -name: Bump version -on: - schedule: - - cron: 00 23 * * * - workflow_dispatch: -jobs: - check_commits: - name: Check for new commits - runs-on: ubuntu-latest - outputs: - new_commits: ${{ steps.check_new_commits.outputs.new_commits }} - steps: - - uses: actions/checkout@v4 - with: - sparse-checkout: custom_components/solarman/ - sparse-checkout-cone-mode: false - - name: Check for new commits - id: check_new_commits - run: | - git_log=$(git log --since=midnight -- custom_components/solarman/) - echo "new_commits=$([[ -n "$git_log" ]] && echo "true" || echo "false")" >> $GITHUB_OUTPUT - check_version: - name: Check for old version - runs-on: ubuntu-latest - needs: check_commits - if: needs.check_commits.outputs.new_commits == 'true' || github.event_name == 'workflow_dispatch' - outputs: - old_version: ${{ steps.check_old_version.outputs.old_version }} - steps: - - uses: actions/checkout@v4 - with: - sparse-checkout: custom_components/solarman/manifest.json - sparse-checkout-cone-mode: false - - name: Check for version - id: check_old_version - run: | - echo "old_version=$(grep -q "\"version\": \"$(date +"%y.%m.%d")\"" custom_components/solarman/manifest.json && echo "false" || echo "true")" >> $GITHUB_OUTPUT - bump: - name: Bump - runs-on: ubuntu-latest - needs: check_version - if: needs.check_version.outputs.old_version == 'true' || github.event_name == 'workflow_dispatch' - permissions: write-all - steps: - - uses: actions/checkout@v4 - with: - sparse-checkout: custom_components/solarman/manifest.json - sparse-checkout-cone-mode: false - - run: | - version=$(date +"%y.%m.%d") - sed -i "s/.*version.*/ \"version\": \"$version\"/" custom_components/solarman/manifest.json - git config --global user.name "Continuous Integration" - git config --global user.email "david@rapan.cz" - git commit -m "chore: Bump version" custom_components/solarman/manifest.json - git tag -a "v$version" -m "Scheduled $([[ $version == *4 ]] || echo 'pre-')release" - git push --follow-tags