Skip to content

Commit 0004963

Browse files
authored
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
1 parent e368255 commit 0004963

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/tests.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,26 @@ on:
77
pull_request:
88
branches:
99
- master
10+
types:
11+
- opened
12+
- synchronize
13+
- reopened
14+
- ready_for_review
15+
- labeled
16+
- unlabeled
1017

1118
jobs:
19+
changelog:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- id: read-version
23+
run: |
24+
echo "::set-output name=VERSION::$(cat ./lib/ice_cube/version.rb | grep VERSION | awk '{ print $3 }' | sed -e 's/\"//g')"
25+
- uses: actions/checkout@v2
26+
- uses: dangoslen/[email protected]
27+
with:
28+
skipLabels: 'skip-changelog'
29+
expectedLatestVersion: ${{ steps.read-version.outputs.VERSION }}
1230
lint:
1331
runs-on: ubuntu-latest
1432
steps:
@@ -19,7 +37,9 @@ jobs:
1937
bundler-cache: true
2038
- run: bundle exec standardrb
2139
test:
22-
needs: lint
40+
needs:
41+
- changelog
42+
- lint
2343
strategy:
2444
matrix:
2545
rails: ['5.2', '6.0.4', '6.1']

0 commit comments

Comments
 (0)