-
Notifications
You must be signed in to change notification settings - Fork 146
65 lines (60 loc) · 1.89 KB
/
check-versioning.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
57
58
59
60
61
62
63
64
65
name: Check versioning
on:
push:
branches: [ main ]
paths-ignore:
- '.gitignore'
- 'LICENSE'
- '**.md'
- Notice.txt
- '.github/workflows/check-versioning.yml'
- '.github/workflows/check-rust.yml'
- '.github/workflows/run-tarpaulin.yml'
- '.github/workflows/run-test-cases.yml'
- '.github/ISSUE_TEMPLATE/**'
- '.github/CODEOWNERS'
- '.vscode/**'
- docs/**
- scripts/**
- tests/**
pull_request:
branches: [ main ]
paths-ignore:
- '.gitignore'
- 'LICENSE'
- '**.md'
- Notice.txt
- '.github/workflows/check-versioning.yml'
- '.github/workflows/check-rust.yml'
- '.github/workflows/run-tarpaulin.yml'
- '.github/workflows/run-test-cases.yml'
- '.github/ISSUE_TEMPLATE/**'
- '.github/CODEOWNERS'
- '.vscode/**'
- docs/**
- scripts/**
- tests/**
release:
types:
- published
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v2
with:
persist-credentials: false
# Only run version check for PRs. If PR title does NOT contain "[SAME VERSION]", then ensure that
# version.txt is different from what is in main.
- if: startsWith(github.event_name, 'pull_request') && contains(github.event.pull_request.title, '[SAME VERSION]') == false
name: Run version check
run: ./version.sh -c
# If PR title does contain "[SAME VERSION]", then do not check that version.txt is different from
# what is in main.
- if: startsWith(github.event_name, 'pull_request') && contains(github.event.pull_request.title, '[SAME VERSION]') == true
name: Run version check
run: ./version.sh -c -s