Merge pull request #242 from swiftss-org/remove-hardcode-url #410
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: | |
branches: | |
- 'feat/**' | |
- 'ci/**' | |
- 'issue/**' | |
- 'master' | |
- 'staging' | |
- 'hotfix/**' | |
- 'bug/**' | |
- 'fix/**' | |
- 'refactor/**' | |
- 'build/**' | |
- 'test/**' | |
- 'dependabot/**' | |
jobs: | |
test: | |
name: Run Tests π¬ | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout π₯ | |
uses: actions/[email protected] | |
- name: Get yarn cache π¦ | |
id: yarn-cache | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/[email protected] | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
node-version: '12' | |
- run: yarn install | |
- run: yarn test --passWithNoTests | |
deploy: | |
name: Release π | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/master' | |
needs: | |
- test | |
steps: | |
- name: Checkout Repository | |
uses: actions/[email protected] | |
- name: Release π | |
if: "github.event_name == 'push'" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: npx semantic-release |