Skip to content

Commit

Permalink
Setup publish release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
timbod7 committed Mar 13, 2020
1 parent 64bd175 commit 153fa80
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
${{ runner.os }}-
- name: Build and run tests
run: "cd haskell; stack build adl-compiler; stack test --fast --no-terminal adl-compiler"
run: "cd haskell; stack build --fast adl-compiler; stack test --fast --no-terminal adl-compiler"
54 changes: 54 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: New release
on:
# Fix to be on special tag
pull_request:

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macos-latest]
steps:
- name: Setup Stack
uses: mstksg/setup-stack@v1

- name: Clone project
uses: actions/checkout@v2
# Fetch all history so git describe works
- run: |
git fetch --prune --unshallow
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.stack
key: ${{ runner.os }}-${{ hashFiles('haskell/stack.yaml') }}
restore-keys: |
${{ runner.os }}-
- 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@v1
with:
name: adl-${{ runner.os }}
path: dist

release:
name: Create Github Release
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

0 comments on commit 153fa80

Please sign in to comment.