github: update build.yaml

This commit is contained in:
1computer1 2020-06-22 05:49:47 -04:00
parent af4ea1c1ce
commit b45a11b58a

View file

@ -25,11 +25,14 @@ jobs:
ghc-version: ${{ matrix.ghc }} ghc-version: ${{ matrix.ghc }}
cabal-version: '3.2' cabal-version: '3.2'
- name: Cache Cabal # - name: Freeze
uses: actions/cache@v1.2.0 # run: cabal freeze
with:
path: ~/.cabal # - name: Cache Cabal
key: ${{ runner.OS }}-${{ matrix.ghc }}-cabal-0 # uses: actions/cache@v1.2.0
# with:
# path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
# key: ${{ runner.OS }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
- name: Build Myriad - name: Build Myriad
run: cabal build -O2 myriad:exe:myriad run: cabal build -O2 myriad:exe:myriad
@ -39,9 +42,10 @@ jobs:
shell: bash shell: bash
run: | run: |
FOUND=$(find dist-newstyle \( -name 'myriad' -o -name 'myriad.exe' \) -type f) FOUND=$(find dist-newstyle \( -name 'myriad' -o -name 'myriad.exe' \) -type f)
strip $FOUND cp $FOUND myriad
gzip --best $FOUND cp config.example.yaml config.yaml
echo ::set-output name=binary::$FOUND.gz strip myriad
tar -cvzf myriad-${{ github.event.release.name }}-${{ runner.OS }}-${{ matrix.ghc }}.tar.gz config.yaml languages myriad
- name: Upload Binary - name: Upload Binary
uses: actions/upload-release-asset@v1.0.2 uses: actions/upload-release-asset@v1.0.2
@ -49,6 +53,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ github.event.release.upload_url }} upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.find_binary.outputs.binary }} asset_path: myriad-${{ github.event.release.name }}-${{ runner.OS }}-${{ matrix.ghc }}.tar.gz
asset_name: myriad-${{ github.event.release.name }}-${{ runner.OS }}-${{ matrix.ghc }}.gz asset_name: myriad-${{ github.event.release.name }}-${{ runner.OS }}-${{ matrix.ghc }}.tar.gz
asset_content_type: application/gzip asset_content_type: application/gzip