Skip to content

Commit 959895e

Browse files
committed
release build
1 parent 772cdf3 commit 959895e

File tree

2 files changed

+336
-22
lines changed

2 files changed

+336
-22
lines changed

.github/workflows/xtractl.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,19 @@ jobs:
4040
name: dist
4141
path: ./xtractl/dist
4242
retention-days: 1
43-
- uses: actions/upload-artifact@v4
44-
with:
45-
name: common
46-
path: ./xtractl/Dockerfile
47-
retention-days: 1
43+
- name: release
44+
#if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
45+
working-directory: ./xtractl/dist
46+
env:
47+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
run: |
49+
chmod +x ./linux-amd64/xtractl
50+
chmod +x ./linux-arm64/xtractl
51+
tar -czvf xtractl_${{ github.ref_name }}_linux_amd64.tar.gz -C ./linux-amd64 xtractl
52+
tar -czvf xtractl_${{ github.ref_name }}_linux_arm64.tar.gz -C ./linux-arm64 xtractl
53+
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --draft
54+
gh release upload ${{ github.ref_name }} xtractl_${{ github.ref_name }}_linux_amd64.tar.gz
55+
gh release upload ${{ github.ref_name }} xtractl_${{ github.ref_name }}_linux_arm64.tar.gz
4856
4957
docker:
5058
runs-on: ubuntu-latest
@@ -53,7 +61,7 @@ jobs:
5361
- name: load
5462
uses: actions/download-artifact@v4
5563
with:
56-
pattern: "{common,dist}"
64+
name: dist
5765
- name: chmod
5866
run: |
5967
chmod +x ./dist/*/xtractl
@@ -84,7 +92,7 @@ jobs:
8492
uses: docker/build-push-action@v6
8593
with:
8694
context: ./dist
87-
file: ./common/Dockerfile
95+
file: ./dist/Dockerfile
8896
push: true
8997
pull: true
9098
tags: |
@@ -98,7 +106,7 @@ jobs:
98106
uses: docker/build-push-action@v6
99107
with:
100108
context: ./dist
101-
file: ./common/Dockerfile
109+
file: ./dist/Dockerfile
102110
push: true
103111
pull: true
104112
tags: |
@@ -112,7 +120,7 @@ jobs:
112120
uses: docker/build-push-action@v6
113121
with:
114122
context: ./dist
115-
file: ./common/Dockerfile
123+
file: ./dist/Dockerfile
116124
push: true
117125
pull: true
118126
tags: |

0 commit comments

Comments
 (0)