diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 268859f..93f69df 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -8,22 +8,32 @@ premissions: jobs: build: runs-on: ubuntu-latest + env: + STACK_YAML: ${{ gitea.workspace }}/stack.yaml + tarball: license-tool-hs-${{ gitea.head_ref }}.${{ gitea.sha }}.tar.gz steps: - name: Check out repository code uses: actions/checkout@v6 - - name: Install Haskell + - name: Install Stack uses: haskell-actions/setup@v2.11.0 with: enable-stack: true stack-no-global: true - stack-setup-ghc: true + stack-setup-ghc: false + - name: Install GHC + run: stack setup - name: Build with Stack - run: env STACK_YAML="${{ gitea.workspace }}/stack.yaml" stack build - - name: Create Tarball + run: stack build + - name: Make Tarball run: | - export STACK_YAML="${{ gitea.workspace }}/stack.yaml" mkdir usr/ stack --local-bin-path usr/bin/ build --copy-bins install -m 0644 -D "${{ gitea.workspace }}/completion/license-tool.zsh" usr/share/zsh/site-functions/_license-tool cp -r "${{ gitea.workspace }}/licenses" usr/share/license-tool - tar -caf license-tool-hs.tar.gz usr/ + tar -caf "${tarball}" usr/ + - name: Upload Artifacts + uses: actions/upload-artifact@v7 + with: + path: ${{ env.tarball }} + compression-level: 0 + archive: false diff --git a/stack.yaml b/stack.yaml index 6b37cd9..e53961e 100644 --- a/stack.yaml +++ b/stack.yaml @@ -17,8 +17,7 @@ # # snapshot: ./custom-snapshot.yaml # snapshot: https://example.com/snapshots/2024-01-01.yaml -snapshot: - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/38.yaml +snapshot: lts-24.38 # User packages to be built. # Various formats can be used as shown in the example below. @@ -30,7 +29,7 @@ snapshot: # - auto-update # - wai packages: -- . + - . # Dependency packages to be pulled from upstream that are not in the snapshot. # These entries can reference officially published versions as well as # forks / in-progress versions pinned to a git hash. For example: diff --git a/stack.yaml.lock b/stack.yaml.lock index d92a13a..d025909 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -9,5 +9,4 @@ snapshots: sha256: abc790b571e0c70e929db74b329e3c18d7e76a6e173e8bdf94f1ba20770d4c24 size: 728990 url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/38.yaml - original: - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/38.yaml + original: lts-24.38