-
Notifications
You must be signed in to change notification settings - Fork 7
56 lines (46 loc) · 1.38 KB
/
makecode-bump.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
name: Auto-bump
on:
push:
branches:
- main
paths-ignore:
- '.github/workflows/**'
- '.gitignore'
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
auto-bump:
name: Auto-bump and release
runs-on: ubuntu-latest
steps:
- run: |
npm install -g makecode
- run: 'git config --global user.email "tech@forwardedu.com"'
- run: 'git config --global user.name "autobump-bot"'
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Count new tutorials
id: new_tutorials
run: >
echo "tutorial_count="
`
git diff $(git describe --tags --abbrev=0):pxt.json pxt.json |
grep -e '^[+-][^/]*.md' |
wc -l
`
>> "$GITHUB_OUTPUT"
- name: SANITY CHECK
run: >
echo "New tutorials: ${{ steps.new_tutorials.outputs.tutorial_count }}";
echo "bump: "`(
[[ ${{ steps.new_tutorials.outputs.tutorial_count }} > 0 ]] &&
echo "minor" ) ||
echo "patch"`;
- run: >
makecode bump --`(
[[ ${{ steps.new_tutorials.outputs.tutorial_count }} > 0 ]] &&
echo "minor" ) ||
echo "patch"`