Skip to content

Commit ab261af

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 <[email protected]>
1 parent c417356 commit ab261af

3 files changed

Lines changed: 83 additions & 119 deletions

File tree

.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/testbinary.yml

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

0 commit comments

Comments
 (0)