Generate DotSlash file on release
Uploads a tar.gz of the binary and uses facebook/dotslash-publish-release
to generate and attach a DotSlash file to the GitHub release.
Assisted-by: Claude Opus 4.6 via pi
diff --git a/.github/dotslash-config.json b/.github/dotslash-config.json
new file mode 100644
index 0000000..a8382e4
--- /dev/null
+++ b/.github/dotslash-config.json
@@ -0,0 +1,12 @@
+{
+ "outputs": {
+ "pinch": {
+ "platforms": {
+ "macos-aarch64": {
+ "regex": "^pinch-aarch64-apple-darwin\\.tar\\.gz$",
+ "path": "pinch"
+ }
+ }
+ }
+ }
+}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 94ee5f1..06282af 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -41,7 +41,7 @@ jobs:
- name: Build
run: |
PINCH_VERSION="${{ steps.version.outputs.version }}" cargo build --release
- cp target/release/pinch pinch-aarch64-apple-darwin
+ tar -czf pinch-aarch64-apple-darwin.tar.gz -C target/release pinch
- name: Publish
run: |
@@ -52,6 +52,14 @@ jobs:
gh release create "v${VERSION}" \
--title "v${VERSION}" \
--generate-notes \
- pinch-aarch64-apple-darwin
+ pinch-aarch64-apple-darwin.tar.gz
env:
GH_TOKEN: ${{ github.token }}
+
+ - name: Generate DotSlash file
+ uses: facebook/dotslash-publish-release@v1
+ with:
+ config: .github/dotslash-config.json
+ tag: v${{ steps.version.outputs.version }}
+ env:
+ GITHUB_TOKEN: ${{ github.token }}