Skip to content

Commit 73b1ab5

Browse files
committed
build: replace AppImage with static build binary
The AppImage build was introduced to give users access to a test binary. Before the switch to meson, the static build was used for this. In the meantime we figured out how to build a static build with meson, so there is no need for the AppImage workflow. Start to add to the release versions of nvme the tag as postfix. Furthermore, upload the artifacts to github. Signed-off-by: Daniel Wagner <wagi@kernel.org>
1 parent c417356 commit 73b1ab5

File tree

3 files changed

+81
-119
lines changed

3 files changed

+81
-119
lines changed

.github/AppImageBuilder.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/appimage.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/upload.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: upload
2+
3+
on:
4+
push:
5+
branches: [master]
6+
release:
7+
types: [published]
8+
9+
jobs:
10+
build-static:
11+
name: build static binary
12+
runs-on: ubuntu-latest
13+
container:
14+
image: ghcr.io/linux-nvme/debian:latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: build
19+
run: |
20+
make static
21+
mkdir upload
22+
cp .build/nvme upload/nvme
23+
if [ "${GITHUB_EVENT_NAME}" = "release" ]; then
24+
VERSION="${GITHUB_REF_NAME#v}"
25+
cp .build/nvme "upload/nvme-${VERSION}"
26+
fi
27+
28+
- uses: actions/upload-artifact@v4
29+
name: upload artifacts to github
30+
with:
31+
name: nvme-cli
32+
path: upload/*
33+
34+
upload-test-binary:
35+
name: upload test binary
36+
runs-on: ubuntu-latest
37+
needs: build-static
38+
if: ${{ github.event_name == 'push' || github.event_name == 'release' }}
39+
steps:
40+
- uses: actions/download-artifact@v4
41+
with:
42+
name: nvme-cli
43+
path: upload
44+
45+
- name: FTP Deployer
46+
uses: sand4rt/ftp-deployer@v1.8
47+
with:
48+
sftp: true
49+
host: ${{ secrets.SFTP_SERVER }}
50+
port: 22
51+
username: ${{ secrets.SFTP_USERNAME }}
52+
password: ${{ secrets.SFTP_PASSWORD }}
53+
remote_folder: '/upload'
54+
local_folder: upload
55+
cleanup: false
56+
include: '[ "nvme", "nvme-*" ]'
57+
exclude: '[".github/**", ".git/**", "*.env"]'
58+
59+
upload-release-assets:
60+
name: upload GitHub release assets
61+
runs-on: ubuntu-latest
62+
needs: build-static
63+
if: ${{ github.event_name == 'release' }}
64+
steps:
65+
- uses: actions/download-artifact@v4
66+
with:
67+
name: nvme-cli
68+
path: upload
69+
70+
- name: derive version and rename file
71+
run: |
72+
VERSION="${GITHUB_REF_NAME#v}"
73+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
74+
75+
- name: upload versioned binary
76+
uses: actions/upload-release-asset@v1
77+
with:
78+
upload_url: ${{ github.event.release.upload_url }}
79+
asset_path: upload/nvme-${{ env.VERSION }}
80+
asset_name: nvme-${{ env.VERSION }}
81+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)