silver-ymz commented on code in PR #3082:
URL: 
https://github.com/apache/incubator-opendal/pull/3082#discussion_r1326774934


##########
.github/workflows/bindings_haskell.yml:
##########
@@ -70,3 +70,54 @@ jobs:
           path: |
             ~/.cabal/store
             bindings/haskell/dist-newstyle
+
+  package:
+    runs-on: ubuntu-latest
+    if: "startsWith(github.ref, 'refs/tags/')"
+    steps:
+      - uses: actions/checkout@v3
+      - name: Setup Haskell toolchain (ghc-9.2.8)
+        run: |
+          curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | 
sh
+          ghcup install ghc 9.2.8 --set
+          ghcup install cabal --set
+          cabal update
+      - name: Setup Rust toolchain
+        uses: ./.github/actions/setup
+      - name: Restore haskell cache
+        uses: actions/cache/restore@v3
+        with:
+          key: ${{ runner.os }}-haskell-${{ hashFiles('**/*.cabal', 
'**/Setup.hs') }}
+          path: |
+            ~/.cabal/store
+            bindings/haskell/dist-newstyle
+          restore-keys: ${{ runner.os }}-haskell-
+      - name: Package
+        working-directory: "bindings/haskell"
+        run: |
+          cargo package --target-dir target
+          cd target/package
+          tar xf opendal-hs-*.crate --strip-components=1
+          cabal sdist
+      - name: Publish candidate to Hackage
+        if: "contains(github.ref, 'rc')"
+        run: |
+          cabal upload -t ${{ secrets.HACKAGE_TOKEN }} 
bindings/haskell/target/package/dist-newstyle/sdist/*.tar.gz

Review Comment:
   removed in new commit



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to