Last active
June 8, 2020 15:04
-
-
Save iRoachie/23767e0681682e1d4065bf1afba656d6 to your computer and use it in GitHub Desktop.
Github Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Staging Deploy | |
on: | |
release: | |
types: [prereleased] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npm install | |
- run: npm run lint | |
- uses: iRoachie/[email protected] | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
with: | |
status: ${{ job.status }} | |
if: ${{ !success() }} | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npm install | |
- run: npm test | |
- uses: iRoachie/[email protected] | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
with: | |
status: ${{ job.status }} | |
if: ${{ !success() }} | |
publish: | |
runs-on: ubuntu-latest | |
needs: [test, lint] | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npm install | |
- run: npm publish | |
- uses: iRoachie/[email protected] | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
with: | |
status: ${{ job.status }} | |
if: ${{ always() }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment