Skip to content

Commit d06beec

Browse files
committed
chore: fix & bump
1 parent 0d55a1e commit d06beec

File tree

4 files changed

+32
-18
lines changed

4 files changed

+32
-18
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
name: CI
2+
23
on:
34
push:
45
branches:
5-
- main
6+
- master
67
pull_request:
7-
types:
8-
- opened
9-
- synchronize
8+
merge_group:
9+
workflow_dispatch:
10+
1011
jobs:
1112
build:
1213
runs-on: ubuntu-24.04
1314
steps:
1415
- uses: actions/checkout@v5
16+
1517
- uses: DeterminateSystems/nix-installer-action@v20
18+
19+
- uses: DeterminateSystems/magic-nix-cache-action@main
20+
1621
- name: Build
1722
run: nix build -L
18-
- name: Run from scratch
19-
id: run-from-scratch
20-
run: |
23+
24+
- run: |
2125
rm meta.json
2226
nix run . -- --download-url-prefix https://example.org/
2327
cat meta.json

.github/workflows/mirror.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,45 @@
11
name: Mirror
2+
23
on:
34
workflow_dispatch:
45
inputs:
56
bindistRegex:
6-
description: 'Regex for which bindists to update'
7+
description: "Regex for which bindists to update"
78
required: false
89
type: string
910
schedule:
10-
- cron: '0 20 * * 0'
11+
- cron: "0 20 * * 0"
12+
1113
jobs:
1214
mirror:
1315
runs-on: ubuntu-24.04
1416
permissions:
1517
contents: write
1618
steps:
1719
- uses: actions/checkout@v5
20+
1821
- uses: DeterminateSystems/nix-installer-action@v20
22+
23+
- uses: DeterminateSystems/magic-nix-cache-action@main
24+
1925
- name: Set release tag name
2026
id: release-tag-name
2127
run: |
2228
echo "TAG=$(date --utc +'%Y%m%dT%H%M%S')" >> "$GITHUB_OUTPUT"
29+
2330
- name: Mirror
2431
run: |
2532
nix run . -- --download-url-prefix \
2633
https://github.com/${{ github.repository }}/releases/download/$TAG/ \
2734
--bindist-regex '${{ inputs.bindistRegex || '' }}'
2835
env:
2936
TAG: ${{ steps.release-tag-name.outputs.TAG }}
37+
3038
- uses: stefanzweifel/git-auto-commit-action@v7
3139
id: auto-commit-action
3240
with:
3341
commit_message: Update mirror metadata
42+
3443
- uses: softprops/action-gh-release@v2
3544
if: steps.auto-commit-action.outputs.changes_detected == 'true'
3645
with:

app/Main.hs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import Crypto.Hash.SHA256 qualified as SHA256
77
import Data.Aeson qualified as A
88
import Data.Aeson.Encode.Pretty qualified as AEP
99
import Data.Aeson.Lens
10-
import Data.ByteString.Base64 (encodeBase64)
10+
import Data.Base64.Types
11+
import Data.ByteString.Base64
1112
import Data.ByteString.Lazy qualified as BL
1213
import Data.Conduit.Lzma qualified as Lzma
1314
import Data.Conduit.Tar qualified as Tar
@@ -96,7 +97,7 @@ updateStoredBindists mgr cli bindistDir =
9697
StoredBindist
9798
{ mirrorUrl = cli.downloadUrlPrefix <> toText fileName,
9899
originalUrl = originalUrl,
99-
sriHash = "sha256-" <> encodeBase64 sha256,
100+
sriHash = "sha256-" <> extractBase64 (encodeBase64 sha256),
100101
ghcSubdir
101102
}
102103
| otherwise = pure prevBindist
@@ -489,7 +490,7 @@ bindistInfos =
489490
projectId = 3212,
490491
ref = "master",
491492
jobName = "x86_64-linux",
492-
artifactPath = "dist/wasi-sdk-27.0-x86_64-linux.tar.gz",
493+
artifactPath = "dist/wasi-sdk-28.0-x86_64-linux.tar.gz",
493494
pipelineFilter = []
494495
}
495496
},
@@ -503,7 +504,7 @@ bindistInfos =
503504
projectId = 3212,
504505
ref = "master",
505506
jobName = "aarch64-darwin",
506-
artifactPath = "dist/wasi-sdk-27.0-arm64-macos.tar.gz",
507+
artifactPath = "dist/wasi-sdk-28.0-arm64-macos.tar.gz",
507508
pipelineFilter = []
508509
}
509510
},
@@ -517,7 +518,7 @@ bindistInfos =
517518
projectId = 3212,
518519
ref = "master",
519520
jobName = "x86_64-darwin",
520-
artifactPath = "dist/wasi-sdk-27.0-arm64-macos.tar.gz",
521+
artifactPath = "dist/wasi-sdk-28.0-arm64-macos.tar.gz",
521522
pipelineFilter = []
522523
}
523524
},
@@ -531,7 +532,7 @@ bindistInfos =
531532
projectId = 3212,
532533
ref = "master",
533534
jobName = "aarch64-linux",
534-
artifactPath = "dist/wasi-sdk-27.0-aarch64-linux.tar.gz",
535+
artifactPath = "dist/wasi-sdk-28.0-aarch64-linux.tar.gz",
535536
pipelineFilter = []
536537
}
537538
},

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)