Skip to content

Commit 597b3cf

Browse files
create convert tool Github Action file
1 parent e43d40c commit 597b3cf

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/convert_tool.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Covert picture to .jxl format and upload to Github Release of this repository
2+
'on':
3+
release:
4+
types:
5+
- published
6+
jobs:
7+
build:
8+
runs-on: macos-13
9+
permissions:
10+
contents: read
11+
packages: write
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
15+
16+
- name: Install jpeg-xl
17+
run: |
18+
brew install jpeg-xl
19+
20+
- name: Build archive
21+
shell: bash
22+
run: >
23+
staging="jxl_file-${{ github.event.release.tag_name }}
24+
25+
mkdir "$staging"
26+
27+
cjxl img/view.jpg view.jxl
28+
29+
cp {img/view.jpg,view.jxl} "$staging/"
30+
31+
tar czf "$staging.tar.gz" -C "$staging" .
32+
33+
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
34+
35+
- name: Upload release archive
36+
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
37+
env:
38+
GITHUB_TOKEN: '${{ secrets.WITH_GITHUB_TOKEN }}'
39+
with:
40+
upload_url: '${{ github.event.release.upload_url }}'
41+
asset_path: '${{ env.ASSET }}'
42+
asset_name: '${{ env.ASSET }}'
43+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)