ensure callbacks are called and removed when no longer needed #65
This file contains 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: CI | |
on: [push] | |
jobs: | |
build: | |
name: Swift ${{ matrix.swift }} on ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["macos-latest"] | |
swift: ["5.5"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Extract Branch Name | |
run: echo "BRANCH=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV | |
- uses: fwal/setup-swift@v1 | |
with: | |
swift-version: ${{ matrix.swift }} | |
- uses: actions/checkout@v2 | |
- name: Build | |
run: swift build | |
- name: Run tests | |
run: swift test | |
- uses: 8398a7/action-slack@v3 | |
if: failure() && env.BRANCH == 'main' | |
with: | |
status: failure | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |