From 00049638ad18ff973d5440585ec7b9925a7f6c55 Mon Sep 17 00:00:00 2001 From: Jon Pascoe Date: Mon, 25 Oct 2021 16:48:42 +0100 Subject: [PATCH] Add changelog enforcement action (#508) * Add changelog enforcement action * Add changelog dependency * Update syntax * Remove bad lines * Update changelog * Update current version detection code * Update path * Update path * Revert path * checkout code * Revert changelog changes * Set version * Label * Reinstate uses key * labels * Get current version * Don't strip quotes * Strip quotes again --- .github/workflows/tests.yaml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7713fda6..71720464 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -7,8 +7,26 @@ on: pull_request: branches: - master + types: + - opened + - synchronize + - reopened + - ready_for_review + - labeled + - unlabeled jobs: + changelog: + runs-on: ubuntu-latest + steps: + - id: read-version + run: | + echo "::set-output name=VERSION::$(cat ./lib/ice_cube/version.rb | grep VERSION | awk '{ print $3 }' | sed -e 's/\"//g')" + - uses: actions/checkout@v2 + - uses: dangoslen/changelog-enforcer@v2.2.0 + with: + skipLabels: 'skip-changelog' + expectedLatestVersion: ${{ steps.read-version.outputs.VERSION }} lint: runs-on: ubuntu-latest steps: @@ -19,7 +37,9 @@ jobs: bundler-cache: true - run: bundle exec standardrb test: - needs: lint + needs: + - changelog + - lint strategy: matrix: rails: ['5.2', '6.0.4', '6.1']