From beef74d8162b002d20ab827d12dd4e42996a5a12 Mon Sep 17 00:00:00 2001 From: marksie1988 Date: Fri, 18 Aug 2023 13:42:32 +0000 Subject: [PATCH 1/2] chore: now only checks that the version has changed --- .github/workflows/release.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eb9e90c2..2322d454 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,10 +22,6 @@ jobs: - name: Install dependencies run: yarn install - - name: Check if TypeScript files changed - id: check-changes - run: echo ::set-output name=changed::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.ts$' | wc -l) - - name: Get latest tag id: get-latest-tag run: echo ::set-output name=latest_tag::$(git describe --tags --abbrev=0 | sed 's/^v//') @@ -40,7 +36,7 @@ jobs: - name: Check if semver label is valid id: check-semver - if: steps.check-changes.outputs.changed == 'true' + if: steps.check-version.outputs.is_higher == 'true' run: | const labelsInput = ${{ toJSON(github.event.pull_request.labels) }}; const currentVersion = ${{ steps.get-version.outputs.version }}; @@ -62,11 +58,11 @@ jobs: echo ::set-output name=is_valid::$(isSemverValid) - name: Build project - if: steps.check-changes.outputs.changed == 'true' && steps.check-semver.outputs.is_valid == 'true' && steps.check-version.outputs.is_higher == 'true' + if: && steps.check-semver.outputs.is_valid == 'true' && steps.check-version.outputs.is_higher == 'true' run: yarn run build - name: 🛎️ Create release - if: steps.check-changes.outputs.changed == 'true' && steps.check-semver.outputs.is_valid == 'true' && steps.check-version.outputs.is_higher == 'true' + if: steps.check-semver.outputs.is_valid == 'true' && steps.check-version.outputs.is_higher == 'true' uses: softprops/action-gh-release@v1 with: files: dist/sunsynk-power-flow-card.js @@ -76,5 +72,5 @@ jobs: generate_release_notes: true - name: 🏷️ Update latest tag - if: steps.check-changes.outputs.changed == 'true' && steps.check-semver.outputs.is_valid == 'true' && steps.check-version.outputs.is_higher == 'true' + if: steps.check-semver.outputs.is_valid == 'true' && steps.check-version.outputs.is_higher == 'true' uses: EndBug/latest-tag@latest From d2f63c0f434cfc4c85cf067e6077867156d5efb1 Mon Sep 17 00:00:00 2001 From: marksie1988 Date: Fri, 18 Aug 2023 13:45:18 +0000 Subject: [PATCH 2/2] chore: change to run everytime push to master --- .github/workflows/release.yml | 2 +- .github/workflows/update_docs.yml | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2322d454..f0ad3237 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: release on: push: branches: - - main + - master workflow_dispatch: jobs: diff --git a/.github/workflows/update_docs.yml b/.github/workflows/update_docs.yml index fa3d9d18..3a724287 100644 --- a/.github/workflows/update_docs.yml +++ b/.github/workflows/update_docs.yml @@ -15,18 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Check for relevant changes - id: check-changes - run: | - changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E "^(readme\.md|docs\/)") - if [ -z "$changed_files" ]; then - echo "No relevant changes. Exiting..." - exit 0 - fi - echo "::set-output name=changed_files::$changed_files" - - name: Deploy to GitHub Pages - if: steps.check-changes.outputs.changed_files != '' uses: totaldebug/sphinx-publish-action@master with: token: ${{ secrets.GITHUB_TOKEN }}