Skip to content

Instantly share code, notes, and snippets.

@iRoachie
Last active June 8, 2020 15:04
Show Gist options
  • Save iRoachie/23767e0681682e1d4065bf1afba656d6 to your computer and use it in GitHub Desktop.
Save iRoachie/23767e0681682e1d4065bf1afba656d6 to your computer and use it in GitHub Desktop.
Github Actions
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/slack-github-actions@v1.0.0
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/slack-github-actions@v1.0.0
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/slack-github-actions@v1.0.0
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