From 419dec96525f6d13252cf8269a68dc1a31556b82 Mon Sep 17 00:00:00 2001 From: a-wing <1@233.email> Date: Mon, 11 Nov 2024 16:45:23 +0800 Subject: [PATCH] add nfpm build package deb 9 --- .github/workflows/release.yml | 63 +++++++++++++---------------------- nfpm/live777.yaml | 6 ++-- nfpm/liveman.yaml | 6 ++-- nfpm/net4mqtt.yaml | 6 ++-- nfpm/whepfrom.yaml | 6 ++-- nfpm/whipinto.yaml | 6 ++-- 6 files changed, 38 insertions(+), 55 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 49e68fb..32099ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} @@ -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" @@ -191,43 +192,6 @@ 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: | @@ -235,6 +199,25 @@ jobs: 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' diff --git a/nfpm/live777.yaml b/nfpm/live777.yaml index c62d994..ef95a07 100644 --- a/nfpm/live777.yaml +++ b/nfpm/live777.yaml @@ -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 <1@233.email>" @@ -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 diff --git a/nfpm/liveman.yaml b/nfpm/liveman.yaml index 9b79de4..f7bf737 100644 --- a/nfpm/liveman.yaml +++ b/nfpm/liveman.yaml @@ -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 <1@233.email>" @@ -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 diff --git a/nfpm/net4mqtt.yaml b/nfpm/net4mqtt.yaml index f24cec2..3404321 100644 --- a/nfpm/net4mqtt.yaml +++ b/nfpm/net4mqtt.yaml @@ -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 <1@233.email>" @@ -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 diff --git a/nfpm/whepfrom.yaml b/nfpm/whepfrom.yaml index cfbc10a..c665c01 100644 --- a/nfpm/whepfrom.yaml +++ b/nfpm/whepfrom.yaml @@ -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 <1@233.email>" @@ -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 diff --git a/nfpm/whipinto.yaml b/nfpm/whipinto.yaml index 179eb16..be3f84b 100644 --- a/nfpm/whipinto.yaml +++ b/nfpm/whipinto.yaml @@ -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 <1@233.email>" @@ -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