Skip to content

Split out packaging action #1080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
push:
branches:
- master
pull_request:
branches:
- '**'

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
## make sure this corresponds with the version in release.yml
node-version: latest


- run: yarn install --immutable --immutable-cache --check-cache

- name: Package extension
run: npx vsce package
- name: Upload extension vsix to workflow artifacts
uses: actions/upload-artifact@v3
with:
name: haskell-${{ github.sha }}.vsix
path: haskell-*.vsix
26 changes: 12 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
ghc: [8.10.7, 9.0.2, 9.2.8, 9.4.7, 9.6.2]
os: [macos-12, ubuntu-latest, windows-latest]
ghc: [8.10.7, 9.4.8, 9.6.4, 9.8.2]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -28,6 +28,11 @@ jobs:
- run: yarn install --immutable --immutable-cache --check-cache
- run: yarn run webpack

# Setup toolchains, install ghcup, install ghc, etc...
- name: Setup Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
- name: Toolchain settings
run: |
ghcup upgrade -i -f
Expand All @@ -37,9 +42,12 @@ jobs:
ghcup install stack latest
ghcup install cabal latest

ghcup install ghc ${{matrix.ghc}}
ghcup set ghc ${{matrix.ghc}}
ghcup install ghc ${{ matrix.ghc }}
ghcup set ghc ${{ matrix.ghc }}

# This is a prefetched, fallback HLS version.
# We want to make sure, we still support old GHC versions
# and graciously fallback to an HLS version that supports the old GHC version, such as 8.10.7
ghcup install hls 2.2.0.0
ghcup install hls latest
shell: bash
Expand Down Expand Up @@ -76,13 +84,3 @@ jobs:
rm -rf test-workspace
rm -rf out
shell: bash

- name: Package tested extension
if: runner.os == 'Linux'
run: npx vsce package
- name: Upload extension vsix to workflow artifacts
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: haskell-${{ github.sha }}.vsix
path: haskell-*.vsix
Loading