-
Notifications
You must be signed in to change notification settings - Fork 147
71 lines (66 loc) · 2.1 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
66
67
68
69
70
71
name: Check versioning
on:
push:
branches: [ main ]
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'CODEOWNERS'
- '**.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:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches: [ main ]
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'CODEOWNERS'
- '**.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
issues:
types:
- labeled
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@v3
with:
persist-credentials: false
# Only run version check for PRs. If PR does NOT have "same version" label, then ensure that
# version.txt is different from what is in main.
- if: startsWith(github.event_name, 'pull_request') && !contains(github.event.pull_request.labels.*.name, 'same version')
name: Run version check (triggered by "same version" label)
run: ./version.sh -c
# If PR does have "same version" label, 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.labels.*.name, 'same version')
name: Run version check (skip, triggered by "same version" label)
run: ./version.sh -c -s