Skip to content

Commit cd1348c

Browse files
authored
simple package validation (dart-archive/lints#3)
* simple package validation * => dart extensions * check for dirs * lib check
1 parent 92e021c commit cd1348c

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: validate
2+
3+
# Controls when the action will run.
4+
on:
5+
# Triggers the workflow on push or pull request events but only for the main branch
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Check for sources
23+
run: |
24+
filecount=`find lib -name '*.dart' | wc -l`
25+
if [ $filecount -ne 0 ] || [ -d "bin" ]
26+
then
27+
echo 'Dart sources are not allowed in this package!'
28+
exit 1
29+
fi

0 commit comments

Comments
 (0)