File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,21 +15,27 @@ jobs:
1515 - name : Checkout
1616 uses : actions/checkout@v4.1.1
1717
18+ - name : Install Nix
19+ uses : DeterminateSystems/nix-installer-action@main
20+
21+ - name : Install Cabal
22+ run : |
23+ nix profile install nixpkgs#cabal-install
24+
1825 - name : Change Plutus Versions
1926 run : |
20- CURRENT_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")
21- sed -i "s/\(hackage.haskell.org \).*\$/\1$CURRENT_DATE/" cabal.project
22- sed -i "s/\(cardano-haskell-packages \).*\$/\1$CURRENT_DATE/" cabal.project
27+ HACKAGE_DATE=$(cabal update --dry-run | grep 'index-state' | awk '{print $6}' | tr -d '.' | sed -n '1p')
28+ CHAP_DATE=$(cabal update --dry-run | grep 'index-state' | awk '{print $6}' | tr -d '.' | sed -n '2p')
29+
30+ sed -i "s/\(hackage.haskell.org \).*\$/\1$HACKAGE_DATE/" cabal.project
31+ sed -i "s/\(cardano-haskell-packages \).*\$/\1$CHAP_DATE/" cabal.project
2332
2433 PLUTUS_VERSION=${{ github.event.inputs.version }}
2534 sed -i "s/\(plutus-core \).*\$/\1\^>=$PLUTUS_VERSION/" "plinth-template.cabal"
2635 sed -i "s/\(plutus-ledger-api \).*\$/\1\^>=$PLUTUS_VERSION/" "plinth-template.cabal"
2736 sed -i "s/\(plutus-tx \).*\$/\1\^>=$PLUTUS_VERSION/" "plinth-template.cabal"
2837 sed -i "s/\(plutus-tx-plugin \).*\$/\1\^>=$PLUTUS_VERSION/" "plinth-template.cabal"
2938
30- - name : Install Nix
31- uses : DeterminateSystems/nix-installer-action@main
32-
3339 - name : Update flake.lock
3440 run : |
3541 nix flake update CHaP hackage --accept-flake-config
5157 pull-request-number : ${{ steps.cpr.outputs.pull-request-number }}
5258 merge-method : squash
5359 token : ${{ secrets.GITHUB_TOKEN }}
54-
60+
61+
You can’t perform that action at this time.
0 commit comments