Allow morpheus-graphql-code-gen-utils to build with GHC 9.8 #128
Workflow file for this run
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
name: Publish Release | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
publish_release: | |
if: ${{ github.base_ref == 'main' && startsWith(github.head_ref, 'publish-release/') && github.event.pull_request.merged == true }} | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
tag_name: ${{ steps.describe.outputs.version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: haskell/actions/[email protected] | |
- name: Upload Packages | |
run: | | |
stack sdist | |
stack upload morpheus-graphql-tests | |
stack upload morpheus-graphql-core | |
stack upload morpheus-graphql-code-gen-utils | |
stack upload morpheus-graphql-code-gen | |
stack upload morpheus-graphql-app | |
stack upload morpheus-graphql-client | |
stack upload morpheus-graphql-subscriptions | |
stack upload morpheus-graphql-server | |
stack upload morpheus-graphql | |
env: | |
HACKAGE_USERNAME: ${{ secrets.HACKAGE_USERNAME }} | |
HACKAGE_PASSWORD: ${{ secrets.HACKAGE_PASSWORD }} | |
- name: Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- name: Describe | |
id: describe | |
run: | | |
npm i | |
npm run release -- describe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.describe.outputs.version }} | |
release_name: ${{ steps.describe.outputs.version }} | |
body: ${{ github.event.pull_request.body }} | |
upload_artifact: | |
needs: publish_release | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target: linux | |
executable: morpheus | |
- os: macOS-latest | |
target: mac-os | |
executable: morpheus | |
- os: windows-latest | |
target: windows | |
executable: morpheus.exe | |
name: Upload Artifacts for ${{ matrix.target }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: setup | |
uses: ./.github/actions/setup-hs | |
- name: Build Artifacts | |
run: stack build morpheus-graphql-code-gen | |
shell: bash | |
- name: Prepare Artifacts | |
run: | | |
mkdir out | |
cd ./out | |
cp $(stack exec which morpheus) ./${{ matrix.executable }} | |
7z a ../morpheus.zip . | |
shell: bash | |
- name: Upload Artifact | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.publish_release.outputs.upload_url }} | |
asset_path: morpheus.zip | |
asset_name: morpheus-${{ matrix.target }}.zip | |
asset_content_type: application/zip | |
test_artifact: | |
needs: [publish_release, upload_artifact] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target: linux | |
- os: macOS-latest | |
target: mac-os | |
- os: windows-latest | |
target: windows | |
name: Test Binaries | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download and extract Artifact | |
run: | | |
curl -o morpheus.zip -LO https://github.com/${{ github.repository }}/releases/download/${{ needs.publish_release.outputs.tag_name }}/morpheus-${{ matrix.target }}.zip | |
7z e morpheus.zip | |
- name: Test CLI Commands | |
run: | | |
./morpheus about | |
./morpheus build examples/code-gen | |
./morpheus build examples/code-gen-docs | |
./morpheus check examples/code-gen | |
./morpheus check examples/code-gen-docs |