diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-01-17 11:15:37 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-01-17 11:15:37 -0700 |
commit | 3130faccf7c9a9a7697e246884e2b60fd4b1f9de (patch) | |
tree | ab171724845fe928ef05692c27351be933228ec2 /.github | |
parent | fd8bfa2853825504c2dbc7678154ac8d56d47035 (diff) | |
parent | 84770e33bb6286c163c3b2b10fa98d264f6672b8 (diff) | |
download | stylish-haskell-3130faccf7c9a9a7697e246884e2b60fd4b1f9de.tar.gz |
Merge tag 'v0.12.2.0'
v0.12.2.0
- 0.12.2.0 (2020-10-08)
* align: Add a new option for aligning only adjacent items (by 1Computer1)
* align: Add support for aligning MultiWayIf syntax (by 1Computer1)
* data: Fix some issues with record field padding
* module_header: Add separate_lists option
* imports: Respect separate_lists for (..) imports
* data: Make sorting deriving list optional (by Maxim Koltsov)
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1aa2369 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,100 @@ +name: CI + +on: ['pull_request', 'push'] + +jobs: + build: + name: Build on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macOS-latest] + stack: ["2.1.3"] + ghc: ["8.8.3"] + + steps: + - name: Get the version + id: get_version + run: 'echo ::set-output name=version::${GITHUB_REF#refs/tags/}' + + - uses: actions/checkout@v2 + + - uses: actions/setup-haskell@v1.1.2 + name: Setup Haskell Stack + with: + ghc-version: ${{ matrix.ghc }} + stack-version: ${{ matrix.stack }} + + - uses: actions/cache@v2 + name: Cache ~/.stack + with: + path: ~/.stack + key: ${{ runner.os }}-${{ matrix.ghc }}-v3 + + - name: Add ~/.local/bin to PATH + run: echo "::add-path::$HOME/.local/bin" + + - name: Build + run: make build + id: build + + - name: Test + run: make test + + - name: Build artifact + if: startsWith(github.ref, 'refs/tags') + run: make artifact + env: + PATAT_TAG: ${{ steps.get_version.outputs.version }} + + - uses: actions/upload-artifact@v2 + if: startsWith(github.ref, 'refs/tags') + with: + path: artifacts/* + name: artifacts + + release: + name: Release + needs: build + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags') + + steps: + - name: Get the version + id: get_version + run: 'echo ::set-output name=version::${GITHUB_REF#refs/tags/}' + + - uses: actions/download-artifact@v2 + with: + name: artifacts + + - name: Display structure of downloaded files + run: ls -R + + - uses: actions/create-release@v1 + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.get_version.outputs.version }} + release_name: ${{ steps.get_version.outputs.version }} + + - name: Upload Linux Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./stylish-haskell-${{ steps.get_version.outputs.version }}-linux-x86_64.tar.gz + asset_name: stylish-haskell-${{ steps.get_version.outputs.version }}-linux-x86_64.tar.gz + asset_content_type: application/gzip + + - name: Upload MacOS Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./stylish-haskell-${{ steps.get_version.outputs.version }}-darwin-x86_64.zip + asset_name: stylish-haskell-${{ steps.get_version.outputs.version }}-darwin-x86_64.zip + asset_content_type: application/zip |