Merge branch 'develop' of github.com:decker-edu/decker into develop #293
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
on: | |
push: | |
branches: | |
- "develop" | |
name: Release develop branch | |
jobs: | |
remove-old-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: remove assets | |
uses: mknejp/delete-release-assets@v1 | |
with: | |
token: ${{ github.token }} | |
tag: latest | |
assets: '*' | |
fail-if-no-assets: false | |
fail-if-no-release: false | |
- name: remove old release | |
uses: cb80/delrel@latest | |
with: | |
tag: latest | |
build-all-platforms: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
name: Decker latest (${{ matrix.os }}) | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: develop | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Setup Haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
stack-no-global: true | |
stack-version: latest | |
stack-setup-ghc: true | |
- name: Build & test | |
run: | | |
stack test | |
stack --local-bin-path=dist install | |
- name: Rename executable | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
mv dist/decker "dist/decker-latest-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}" | |
- name: Rename executable | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
mv dist/decker.exe "dist/decker-latest-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}.exe" | |
- name: Release | |
uses: "softprops/action-gh-release@v1" | |
with: | |
token: ${{ github.token }} | |
name: latest | |
tag_name: latest | |
target_commitish: develop | |
draft: false | |
prerelease: true | |
files: | | |
readme.md | |
changelog.md | |
dist/** |