-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (61 loc) · 2 KB
/
Copy pathversion-contract.yml
File metadata and controls
69 lines (61 loc) · 2 KB
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
name: Version Contract
on:
push:
branches: [main, develop]
paths:
- "Cargo.toml"
- "release/breaking-changes.md"
- "release/promotion-source"
- "scripts/release.ps1"
- "scripts/release.sh"
- "scripts/test-release-policy.sh"
- "docs/project/release-process.md"
- "docs/project/tooling.md"
- ".github/workflows/prepare-release.yml"
- ".github/workflows/publish-release.yml"
- ".github/workflows/release.yml"
- ".github/workflows/cleanup-prereleases.yml"
- ".github/workflows/version-contract.yml"
pull_request:
branches: [main, develop]
paths:
- "Cargo.toml"
- "release/breaking-changes.md"
- "release/promotion-source"
- "scripts/release.ps1"
- "scripts/release.sh"
- "scripts/test-release-policy.sh"
- "docs/project/release-process.md"
- "docs/project/tooling.md"
- ".github/workflows/prepare-release.yml"
- ".github/workflows/publish-release.yml"
- ".github/workflows/release.yml"
- ".github/workflows/cleanup-prereleases.yml"
- ".github/workflows/version-contract.yml"
permissions:
contents: read
jobs:
policy:
name: Validate release policy
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bash syntax
run: |
bash -n scripts/release.sh
bash -n scripts/test-release-policy.sh
- name: Release policy tests
run: bash scripts/test-release-policy.sh
- name: Current version contract
run: ./scripts/release.sh --check
- name: Pull request version transition
if: github.event_name == 'pull_request'
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: ./scripts/release.sh --check-transition "$BASE_SHA" "$HEAD_SHA"
- name: PowerShell wrapper contract
shell: pwsh
run: ./scripts/release.ps1 -Check