-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (37 loc) · 1.05 KB
/
build.yaml
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
name: build
on:
push:
branches:
- "main"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
version_changed:
runs-on: ubuntu-latest
name: Check if the version was bumped
outputs:
version_changed: ${{ steps.changed_files.outputs.version_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check VERSION file for changes
id: changed_files
run: |
diff=$(git diff HEAD~ -- VERSION)
echo "The diff is ${diff}"
if [ -n "$diff" ]; then
has_changes='true'
else
has_changes='false'
fi
echo "Found changed: ${has_changes}"
echo "version_changed=${has_changes}" >> "$GITHUB_OUTPUT"
build_and_test:
needs: version_changed
secrets: inherit
uses: ./.github/workflows/build_and_test.yaml
with:
build_type: branch
publish_packages: ${{ needs.version_changed.outputs.version_changed }}