Skip to content

Commit

Permalink
add nfpm build package deb 9
Browse files Browse the repository at this point in the history
  • Loading branch information
a-wing committed Nov 11, 2024
1 parent a19042a commit 419dec9
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 55 deletions.
63 changes: 23 additions & 40 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ jobs:
- name: Set nFPM environment
if: ${{ matrix.job.nfpm }}
run: |
echo "ARCH=${{ matrix.job.nfpm }}" >> $GITHUB_ENV
echo "TARGET=${{ matrix.job.target }}" >> $GITHUB_ENV
echo "NFPM_ARCH=${{ matrix.job.nfpm }}" >> $GITHUB_ENV
echo "NFPM_TARGET=${{ matrix.job.target }}" >> $GITHUB_ENV
# echo "NFPM_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
echo "NFPM_VERSION=v0.0.0" >> $GITHUB_ENV
- name: Build nFPM config
if: ${{ matrix.job.nfpm }}
Expand All @@ -182,7 +184,6 @@ jobs:
if: ${{ matrix.job.nfpm }}
shell: bash
run: |
echo "VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
ls -l
echo ${GITHUB_REF_NAME}
echo "live777_${GITHUB_REF_NAME}_${ARCH}.deb"
Expand All @@ -191,50 +192,32 @@ jobs:
echo "live777_${VERSION}_${ARCH}.deb"
echo "live777_${{ env.VERSION }}_${ARCH}.deb"
- name: Artifact Upload Live777
uses: actions/upload-artifact@v4
with:
name: ${{ env.TAR_LIVE777_NAME }}
path: ${{ env.TAR_LIVE777_NAME }}

- name: Artifact Upload Live777 deb
uses: actions/upload-artifact@v4
if: ${{ matrix.job.nfpm }}
with:
name: live777_${{ env.VERSION }}_${{ env.ARCH }}.deb
path: live777_${{ env.VERSION }}_${{ env.ARCH }}.deb

- name: Artifact Upload LiveMan
uses: actions/upload-artifact@v4
with:
name: ${{ env.TAR_LIVEMAN_NAME }}
path: ${{ env.TAR_LIVEMAN_NAME }}

- name: Artifact Upload Whepfrom
uses: actions/upload-artifact@v4
with:
name: ${{ env.PKG_WHEPFROM_NAME }}
path: ${{ env.BUILD_PATH }}/whepfrom${{ env.EXE_SUFFIX }}

- name: Artifact Upload Whipinto
uses: actions/upload-artifact@v4
with:
name: ${{ env.PKG_WHIPINTO_NAME }}
path: ${{ env.BUILD_PATH }}/whipinto${{ env.EXE_SUFFIX }}

- name: Artifact Upload Net4mqtt
uses: actions/upload-artifact@v4
with:
name: ${{ env.PKG_NET4MQTT_NAME }}
path: ${{ env.BUILD_PATH }}/net4mqtt${{ env.EXE_SUFFIX }}

- name: Rename binary
shell: bash
run: |
mv ${{ env.BUILD_PATH }}/whepfrom${{ env.EXE_SUFFIX }} ${{ env.PKG_WHEPFROM_NAME }}
mv ${{ env.BUILD_PATH }}/whipinto${{ env.EXE_SUFFIX }} ${{ env.PKG_WHIPINTO_NAME }}
mv ${{ env.BUILD_PATH }}/net4mqtt${{ env.EXE_SUFFIX }} ${{ env.PKG_NET4MQTT_NAME }}
- name: Artifact Upload Binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.job.target }}_binary
path: |
${{ env.TAR_LIVE777_NAME }}
${{ env.TAR_LIVEMAN_NAME }}
${{ env.PKG_WHEPFROM_NAME }}
${{ env.PKG_WHIPINTO_NAME }}
${{ env.PKG_NET4MQTT_NAME }}
- name: Artifact Upload debian
uses: actions/upload-artifact@v4
if: ${{ matrix.job.nfpm }}
with:
name: ${{ matrix.job.target }}_debian
path: |
*.deb
- name: Upload release archive
shell: bash
if: github.ref_type == 'tag'
Expand Down
6 changes: 3 additions & 3 deletions nfpm/live777.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "live777"
arch: "${ARCH}"
arch: "${NFPM_ARCH}"
platform: "linux"
version: "${VERSION}"
version: "${NFPM_VERSION}"
section: "utility"
priority: "optional"
maintainer: "Max A-wing <[email protected]>"
Expand All @@ -12,7 +12,7 @@ vendor: "BinBat"
homepage: "http://live777.binbat.com"
license: "MPL-2.0"
contents:
- src: ./target/${TARGET}/release/live777
- src: ./target/${NFPM_TARGET}/release/live777
dst: /usr/bin/live777
- src: ./conf/live777.service
dst: /usr/lib/systemd/system/live777.service
Expand Down
6 changes: 3 additions & 3 deletions nfpm/liveman.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "liveman"
arch: "${ARCH}"
arch: "${NFPM_ARCH}"
platform: "linux"
version: "${VERSION}"
version: "${NFPM_VERSION}"
section: "utility"
priority: "optional"
maintainer: "Max A-wing <[email protected]>"
Expand All @@ -12,7 +12,7 @@ vendor: "BinBat"
homepage: "http://live777.binbat.com"
license: "MPL-2.0"
contents:
- src: ./target/${TARGET}/release/liveman
- src: ./target/${NFPM_TARGET}/release/liveman
dst: /usr/bin/liveman
- src: ./conf/liveman.service
dst: /usr/lib/systemd/system/liveman.service
Expand Down
6 changes: 3 additions & 3 deletions nfpm/net4mqtt.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "net4mqtt"
arch: "${ARCH}"
arch: "${NFPM_ARCH}"
platform: "linux"
version: "${VERSION}"
version: "${NFPM_VERSION}"
section: "utility"
priority: "optional"
maintainer: "Max A-wing <[email protected]>"
Expand All @@ -12,6 +12,6 @@ vendor: "BinBat"
homepage: "http://live777.binbat.com"
license: "MPL-2.0"
contents:
- src: ./target/${TARGET}/release/net4mqtt
- src: ./target/${NFPM_TARGET}/release/net4mqtt
dst: /usr/bin/net4mqtt

6 changes: 3 additions & 3 deletions nfpm/whepfrom.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "whepfrom"
arch: "${ARCH}"
arch: "${NFPM_ARCH}"
platform: "linux"
version: "${VERSION}"
version: "${NFPM_VERSION}"
section: "utility"
priority: "optional"
maintainer: "Max A-wing <[email protected]>"
Expand All @@ -12,6 +12,6 @@ vendor: "BinBat"
homepage: "http://live777.binbat.com"
license: "MPL-2.0"
contents:
- src: ./target/${TARGET}/release/whepfrom
- src: ./target/${NFPM_TARGET}/release/whepfrom
dst: /usr/bin/whepfrom

6 changes: 3 additions & 3 deletions nfpm/whipinto.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "whipinto"
arch: "${ARCH}"
arch: "${NFPM_ARCH}"
platform: "linux"
version: "${VERSION}"
version: "${NFPM_VERSION}"
section: "utility"
priority: "optional"
maintainer: "Max A-wing <[email protected]>"
Expand All @@ -12,6 +12,6 @@ vendor: "BinBat"
homepage: "http://live777.binbat.com"
license: "MPL-2.0"
contents:
- src: ./target/${TARGET}/release/whipinto
- src: ./target/${NFPM_TARGET}/release/whipinto
dst: /usr/bin/whipinto

0 comments on commit 419dec9

Please sign in to comment.