-
Notifications
You must be signed in to change notification settings - Fork 17
72 lines (61 loc) · 1.64 KB
/
main.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
72
name: CICD
on:
pull_request:
push:
branches:
- master
jobs:
test:
strategy:
matrix:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Convert
id: convert
uses: ./
with:
text: |
# Heading 1
## Heading 2
[Link](http://example.com)
* List Item 1
* List Item 2
- name: Verify
shell: bash
env:
ACTUAL: ${{ steps.convert.outputs.text }}
EXPECTED: |
*Heading 1*\n\n*Heading 2*\n\n<http://example.com|Link>\n\n• List Item 1\n• List Item 2\n
run: |
if [ "$ACTUAL" != "$EXPECTED" ]; then
echo "Actual: '$ACTUAL'"
echo "Expected: '$EXPECTED'"
exit 1
fi
release:
needs: test
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Release
id: release
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 19
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update major version tag
if: steps.release.outputs.new_release_published == 'true'
env:
TAG: v${{ steps.release.outputs.new_release_major_version }}
run: |
git tag --force "$TAG"
git push --force origin "$TAG"