File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change 76
76
cargo build --verbose --release --target ${{ matrix.target }}
77
77
$bin="target/${{ matrix.target }}/release/rvimage.exe"
78
78
echo "BIN=$bin" >> $env:GITHUB_ENV
79
-
79
+
80
80
- name : Build release binary MacOS
81
81
shell : bash
82
82
if : matrix.os == 'macos-latest'
@@ -105,10 +105,34 @@ jobs:
105
105
echo "ASSET_SUM=$FOLDER.tar.gz.sha256" >> $GITHUB_ENV
106
106
fi
107
107
108
- - name : Upload release archive
108
+ - name : Generate Scoop manifest
109
+ if : matrix.os == 'windows-latest'
110
+ shell : bash
111
+ run : |
112
+ version="${{ needs.create-release.outputs.version }}"
113
+ bin_url="https://github.com/${{ github.repository }}/releases/download/$version/${{ env.ASSET }}"
114
+ bin_hash=$(certutil -hashfile "${{ env.ASSET }}" SHA256 | findstr /v "SHA256")
115
+ cat <<EOF > scoop-manifest.json
116
+ {
117
+ "version": "$version",
118
+ "description": "Remote Image Viewer and annotation tool",
119
+ "homepage": "https://github.com/${{ github.repository }}",
120
+ "license": "MIT",
121
+ "architecture": {
122
+ "64bit": {
123
+ "url": "$bin_url",
124
+ "hash": "$bin_hash"
125
+ }
126
+ },
127
+ "bin": "rvimage.exe"
128
+ }
129
+ EOF
130
+ echo "SCOOP_MANIFEST=scoop-manifest.json" >> $GITHUB_ENV
131
+
132
+ - name : Upload release archive and Scoop manifest
109
133
env :
110
134
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
111
135
shell : bash
112
136
run : |
113
137
version="${{ needs.create-release.outputs.version }}"
114
- gh release upload "$version" ${{ env.ASSET }} ${{ env.ASSET_SUM }}
138
+ gh release upload "$version" ${{ env.ASSET }} ${{ env.ASSET_SUM }} ${{ env.SCOOP_MANIFEST }}
You can’t perform that action at this time.
0 commit comments