Skip to content

Update java tests to use gradle 8 #45

Update java tests to use gradle 8

Update java tests to use gradle 8 #45

Workflow file for this run

name: New release
on:
push:
tags:
- v[0-9]*
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Setup Stack
uses: haskell/actions/setup@v2
with:
ghc-version: '8.8.4' # Exact version of ghc to use
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
enable-stack: true
stack-version: 'latest'
- name: Clone project
uses: actions/checkout@v3
# Fetch all history so git describe works
- run: |
git fetch --prune --unshallow
- name: Cache ~/.stack
uses: actions/cache@v3
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-global-
- name: Cache .stack-work
uses: actions/cache@v3
with:
path: haskell/.stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }}
restore-keys: |
${{ runner.os }}-stack-work-
- name: Build compiler and generate zip
run: "cd haskell; stack build adl-compiler; ./tools/make-dist.hs"
- name: Upload dist directory artifacts
uses: actions/upload-artifact@v3
with:
name: dist-${{ runner.os }}
path: dist
release:
name: Create Github Release
needs: [build]
permissions:
contents: write
runs-on: ubuntu-latest
steps:
# strip "refs/tags/v"
- name: Determine version
id: version
run:
echo "version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
- name: Fetch macOS build
uses: actions/download-artifact@v3
with:
name: dist-macOS
path: dist-macOS
- name: Fetch linux build
uses: actions/download-artifact@v3
with:
name: dist-Linux
path: dist-Linux
- run: |
mv dist-macOS/adl-bindist.zip ./adl-bindist-${{ steps.version.outputs.version }}-osx.zip
mv dist-Linux/adl-bindist.zip ./adl-bindist-${{ steps.version.outputs.version }}-linux.zip
ls -al
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ steps.version.outputs.version }}
files: |
adl-bindist-${{ steps.version.outputs.version }}-osx.zip
adl-bindist-${{ steps.version.outputs.version }}-linux.zip