File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ # prevent all files from being included in release archives
2
+ * export-ignore
3
+ meetings export-ignore
4
+ scripts export-ignore
Original file line number Diff line number Diff line change
1
+ name : release
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ paths :
8
+ - meetings/**
9
+
10
+ jobs :
11
+ build :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - id : files
15
+ name : get changed files
16
+ uses : jitterbit/get-changed-files@v1
17
+ with :
18
+ format : ' json'
19
+ - run : |
20
+ readarray -t added_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.added }}')"
21
+
22
+ for added_file in "${added_files[@]}"; do
23
+ if [[ ${added_file} == meetings/* ]]
24
+ then
25
+ tag=$(echo "${added_file}" | grep -oP '(?<=meetings/)[^\./]+')
26
+ echo "tag=${tag}" >> "$GITHUB_ENV" # set GH env var so other action can access it
27
+ echo tag set to "${tag}"
28
+ break
29
+ fi
30
+ done
31
+ - name : checkout
32
+ uses : actions/checkout@v3
33
+ - name : release
34
+ run : |
35
+ git fetch --depth=1 --tags
36
+
37
+ if [[ $(git tag -l "${{env.tag}}") ]]
38
+ then
39
+ echo "release exists; skipping"
40
+ else
41
+ gh release create "${{env.tag}}"
42
+ fi
43
+ env :
44
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments