Skip to content

Commit

Permalink
Update workflow files.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdotdesign committed Nov 12, 2020
1 parent a7ed78d commit 96a3b3b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/linux-ci.yml
Expand Up @@ -9,28 +9,31 @@ jobs:
steps:
- name: Install Crystal
uses: oprypin/install-crystal@v1.2.4

- name: Checkout Source
uses: actions/checkout@v2


- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v3.x

- name: Install Dependencies
run: shards install

- name: Run Tests
run: crystal spec --error-on-warnings --error-trace

- name: Check Formatting
run: crystal tool format --check

- name: Run Ameba
run: bin/ameba

- name: Run Core Tests
run: make test-core

- name: Build Binary
run: docker-compose run --rm app crystal build src/mint.cr -o build/mint-${GITHUB_REF:-latest}-linux --release --static
run: docker-compose run --rm app crystal build src/mint.cr -o build/mint-${GITHUB_REF_SLUG}-linux --release --static

- name: Upload to S3
uses: shallwefootball/upload-s3-action@v1.1.2
if: github.ref == 'refs/heads/master'
Expand All @@ -42,7 +45,7 @@ jobs:

- name: Upload to GitHub Releases
uses: fnkr/github-action-ghr@v1.3
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/')
env:
GHR_PATH: build/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 14 additions & 11 deletions .github/workflows/macos-ci.yml
Expand Up @@ -8,29 +8,32 @@ jobs:

steps:
- name: Install Crystal
uses: oprypin/install-crystal@v1.2.4
run: brew install crystal

- name: Checkout Source
uses: actions/checkout@v2


- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v3.x

- name: Install Dependencies
run: shards install

- name: Run Tests
run: crystal spec --error-on-warnings --error-trace

- name: Check Formatting
run: crystal tool format --check

- name: Run Ameba
run: bin/ameba

- name: Run Core Tests
run: make test-core

- name: Build Binary
run: crystal build src/mint.cr -o build/mint-${TRAVIS_TAG:-latest}-osx --release
run: crystal build src/mint.cr -o build/mint-${GITHUB_REF_SLUG}-osx --release

- name: Upload to S3
uses: shallwefootball/upload-s3-action@v1.1.2
if: github.ref == 'refs/heads/master'
Expand All @@ -42,7 +45,7 @@ jobs:

- name: Upload to GitHub Releases
uses: fnkr/github-action-ghr@v1.3
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/')
env:
GHR_PATH: build/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 96a3b3b

Please sign in to comment.