55name : Release
66
77jobs :
8- release :
8+ test :
99 name : Publish Package
1010 runs-on : ubuntu-latest
1111 steps :
2121 run : yarn install
2222 - name : Test
2323 run : yarn test
24+ - uses : 8398a7/action-slack@v1
25+ with :
26+ type : failure
27+ env :
28+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
30+ if : failure()
31+
32+ release :
33+ name : Publish Package
34+ needs : test
35+ runs-on : ubuntu-latest
36+ steps :
37+ - name : Checkout
38+ uses : actions/checkout@master
39+ with :
40+ fetch-depth : 3
41+ - name : Check package version
42+ uses : technote-space/ga-package-version-checker@v1
43+ with :
44+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45+ - name : Install Package dependencies
46+ run : yarn install
2447 - name : Build
2548 run : yarn build
2649 - name : Publish
@@ -39,12 +62,15 @@ jobs:
3962
4063 pages :
4164 name : Publish GitHub Pages
65+ needs : test
4266 runs-on : ubuntu-latest
4367 steps :
4468 - name : Checkout
4569 uses : actions/checkout@master
4670 with :
4771 fetch-depth : 3
72+ - name : Install Package dependencies
73+ run : yarn install
4874 - name : Build
4975 run : |
5076 git clone --depth=1 https://github.com/wp-content-framework/travis-ci.git travis-ci
@@ -60,15 +86,25 @@ jobs:
6086 ACCESS_TOKEN : ${{ secrets.ACCESS_TOKEN }}
6187 BRANCH : gh-pages
6288 FOLDER : gh-pages
89+ - uses : 8398a7/action-slack@v1
90+ with :
91+ type : failure
92+ env :
93+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
94+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
95+ if : failure()
6396
6497 releases :
6598 name : Upload build files
99+ needs : test
66100 runs-on : ubuntu-latest
67101 steps :
68102 - name : Checkout
69103 uses : actions/checkout@master
70104 with :
71105 fetch-depth : 3
106+ - name : Install Package dependencies
107+ run : yarn install
72108 - name : Build
73109 run : yarn build
74110 - name : Upload
@@ -79,3 +115,22 @@ jobs:
79115 asset_name : jquery.marker-animation.min.js
80116 tag : ${{ github.ref }}
81117 overwrite : true
118+ - uses : 8398a7/action-slack@v1
119+ with :
120+ type : failure
121+ env :
122+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
123+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
124+ if : failure()
125+
126+ slack :
127+ name : Slack
128+ needs : [release, pages, releases]
129+ runs-on : ubuntu-latest
130+ steps :
131+ - uses : 8398a7/action-slack@v1
132+ with :
133+ type : success
134+ env :
135+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
136+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
0 commit comments