67 lines (58 loc) · 1.96 KB
/
validate.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
name: Validate
on: pull_request
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x
- run: npm ci
- run: npm run lint
# dog-food testing. Should not release here at all, cause it runs on a PR.
- name: semantic-release
id: semantic-test
uses: ./
with:
dry_run: true
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'master',
'next',
'next-major',
{
name: 'beta',
prerelease: true
},
{
name: 'alpha',
prerelease: true
}
]
repository_url: https://github.com/codfish/semantic-release-action.git
tag_format: 'v${version}'
extends: '@semantic-release/apm-config'
additional_packages: |
['@semantic-release/apm@3.0.0', '@semantic-release/git', '@semantic-release/apm-config']
plugins: |
['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/github', '@semantic-release/apm', '@semantic-release/git']
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# dog-food testing. Should not release here at all, cause it runs on a PR.
- name: semantic-release with no inputs
id: semantic
uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: test output
if: steps.semantic.outputs.new-release-published == 'false'
run: |
echo "$OUTPUTS"
echo "should be false: $NEW_RELEASE_PUBLISHED"
echo "should be empty: $RELEASE_MAJOR"
echo "should be empty: $RELEASE_MINOR"
echo "should be empty: $RELEASE_PATCH"
env:
OUTPUTS: ${{ toJson(steps.semantic.outputs) }}