-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (59 loc) · 1.53 KB
/
test.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
on:
push:
branches: [ main, dev ]
jobs:
build-first:
name: Create release notes for first version in changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# call current version of action from local path
- uses: ./
with:
version: 0.1.0
end-pattern: '$'
chop: 0
- run: cat RELEASE.md
build-pattern:
name: Uses explicit begin and end pattern
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./
with:
version: 0.1.5
begin-pattern: '/^### Fixed/'
end-pattern: '/^##/'
- run: cat RELEASE.md
build-headpath:
name: Uses the input variable working-directory
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: subdir
- uses: ./subdir
with:
version: 1.1.0
working-directory: subdir
- run: cat subdir/RELEASE.md
build-missing-link:
name: Tests what happens if link is missing in CHANGELOG.md
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Remove link from CHANGELOG.md
run: sed -i 's/\[0.1.1\]:.*//' CHANGELOG.md
- uses: ./
with:
version: 0.1.1
build-headless:
name: Tests what happens if RELEASE_HEAD.md does not exist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Remove RELEASE_HEAD.md
run: rm RELEASE_HEAD.md
- uses: ./
with:
version: 1.1.0