Skip to content

Commit 44985ed

Browse files
authored
Merge pull request #26 from rudihorn/rhorn/ci/fix
Fix CI job
2 parents 2fbf32c + 4025f0d commit 44985ed

File tree

2 files changed

+74
-64
lines changed

2 files changed

+74
-64
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
name: Release
22
on:
3-
push:
4-
tags:
5-
- 'v[0-9]+.[0-9]+.[0-9]+'
3+
pull_request:
4+
branches:
5+
- master
66

77
env:
88
BIN_NAME: drm-vc4-grabber
9-
PROJECT_NAME: drm-vc4-grabber
10-
REPO_NAME: rudihorn/drm-vc4-grabber
119

1210
jobs:
1311
dist:
@@ -67,65 +65,7 @@ jobs:
6765
mkdir dist
6866
cp "target/${{ matrix.target }}/release/$BIN_NAME" "dist/"
6967
70-
- uses: actions/upload-artifact@v2.2.4
68+
- uses: actions/upload-artifact@v4
7169
with:
7270
name: bins-${{ matrix.build }}
7371
path: dist
74-
75-
publish:
76-
name: Publish
77-
needs: [dist]
78-
runs-on: ubuntu-latest
79-
steps:
80-
- name: Checkout sources
81-
uses: actions/checkout@v2
82-
with:
83-
submodules: false
84-
85-
- uses: actions/download-artifact@v2
86-
87-
- run: ls -al bins-*
88-
89-
- name: Calculate tag name
90-
run: |
91-
name=dev
92-
if [[ $GITHUB_REF == refs/tags/v* ]]; then
93-
name=${GITHUB_REF:10}
94-
fi
95-
echo ::set-output name=val::$name
96-
echo TAG=$name >> $GITHUB_ENV
97-
id: tagname
98-
99-
- name: Build archive
100-
shell: bash
101-
run: |
102-
set -ex
103-
104-
rm -rf tmp
105-
mkdir tmp
106-
mkdir dist
107-
108-
for dir in bins-* ; do
109-
platform=${dir#"bins-"}
110-
pkgname=$PROJECT_NAME-$TAG-$platform
111-
mkdir tmp/$pkgname
112-
# cp LICENSE README.md tmp/$pkgname
113-
mv bins-$platform/$BIN_NAME$exe tmp/$pkgname
114-
chmod +x tmp/$pkgname/$BIN_NAME$exe
115-
116-
tar cJf dist/$pkgname.tar.xz -C tmp $pkgname
117-
done
118-
119-
- name: Upload binaries to release
120-
uses: svenstaro/upload-release-action@v2
121-
with:
122-
repo_token: ${{ secrets.GITHUB_TOKEN }}
123-
file: dist/*
124-
file_glob: true
125-
tag: ${{ steps.tagname.outputs.val }}
126-
overwrite: true
127-
128-
- name: Extract version
129-
id: extract-version
130-
run: |
131-
printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}"

.github/workflows/publish.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- 'v[0-9]+.[0-9]+.[0-9]+'
6+
7+
env:
8+
BIN_NAME: drm-vc4-grabber
9+
PROJECT_NAME: drm-vc4-grabber
10+
REPO_NAME: rudihorn/drm-vc4-grabber
11+
12+
jobs:
13+
14+
publish:
15+
name: Publish
16+
needs: [dist]
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout sources
20+
uses: actions/checkout@v2
21+
with:
22+
submodules: false
23+
24+
- uses: actions/download-artifact@v4
25+
26+
- run: ls -al bins-*
27+
28+
- name: Calculate tag name
29+
run: |
30+
name=dev
31+
if [[ $GITHUB_REF == refs/tags/v* ]]; then
32+
name=${GITHUB_REF:10}
33+
fi
34+
echo ::set-output name=val::$name
35+
echo TAG=$name >> $GITHUB_ENV
36+
id: tagname
37+
38+
- name: Build archive
39+
shell: bash
40+
run: |
41+
set -ex
42+
43+
rm -rf tmp
44+
mkdir tmp
45+
mkdir dist
46+
47+
for dir in bins-* ; do
48+
platform=${dir#"bins-"}
49+
pkgname=$PROJECT_NAME-$TAG-$platform
50+
mkdir tmp/$pkgname
51+
# cp LICENSE README.md tmp/$pkgname
52+
mv bins-$platform/$BIN_NAME$exe tmp/$pkgname
53+
chmod +x tmp/$pkgname/$BIN_NAME$exe
54+
55+
tar cJf dist/$pkgname.tar.xz -C tmp $pkgname
56+
done
57+
58+
- name: Upload binaries to release
59+
uses: svenstaro/upload-release-action@v2
60+
with:
61+
repo_token: ${{ secrets.GITHUB_TOKEN }}
62+
file: dist/*
63+
file_glob: true
64+
tag: ${{ steps.tagname.outputs.val }}
65+
overwrite: true
66+
67+
- name: Extract version
68+
id: extract-version
69+
run: |
70+
printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}"

0 commit comments

Comments
 (0)