Skip to content

Commit

Permalink
feat(infra): add rpm and archlinux package
Browse files Browse the repository at this point in the history
  • Loading branch information
a-wing committed Nov 15, 2024
1 parent efeeb79 commit b8186fd
Showing 1 changed file with 45 additions and 17 deletions.
62 changes: 45 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,24 @@ jobs:
# Let subsequent steps know where to find the compressed package
echo "TAR_LIVEMAN_NAME=${TAR_NAME}" >> $GITHUB_ENV
- name: Rename binary
shell: bash
run: |
cp ${{ env.BUILD_PATH }}/whepfrom${{ env.EXE_SUFFIX }} ${{ env.PKG_WHEPFROM_NAME }}
cp ${{ env.BUILD_PATH }}/whipinto${{ env.EXE_SUFFIX }} ${{ env.PKG_WHIPINTO_NAME }}
cp ${{ env.BUILD_PATH }}/net4mqtt${{ env.EXE_SUFFIX }} ${{ env.PKG_NET4MQTT_NAME }}
- name: Artifact Upload Binary
uses: actions/upload-artifact@v4
with:
name: ${{ env.VERSION }}_${{ matrix.job.target }}_bin
path: |
${{ env.TAR_LIVE777_NAME }}
${{ env.TAR_LIVEMAN_NAME }}
${{ env.PKG_WHEPFROM_NAME }}
${{ env.PKG_WHIPINTO_NAME }}
${{ env.PKG_NET4MQTT_NAME }}
- name: Install nFPM
if: ${{ matrix.job.nfpm }}
run: |
Expand Down Expand Up @@ -184,36 +202,46 @@ jobs:
nfpm pkg --packager deb --config whipinto.yaml
nfpm pkg --packager deb --config whepfrom.yaml
- 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 }}
nfpm pkg --packager rpm --config live777.yaml
nfpm pkg --packager rpm --config liveman.yaml
nfpm pkg --packager rpm --config net4mqtt.yaml
nfpm pkg --packager rpm --config whipinto.yaml
nfpm pkg --packager rpm --config whepfrom.yaml
- name: Artifact Upload Binary
nfpm pkg --packager archlinux --config live777.yaml
nfpm pkg --packager archlinux --config liveman.yaml
nfpm pkg --packager archlinux --config net4mqtt.yaml
nfpm pkg --packager archlinux --config whipinto.yaml
nfpm pkg --packager archlinux --config whepfrom.yaml
- name: Artifact Upload deb package
uses: actions/upload-artifact@v4
if: ${{ matrix.job.nfpm }}
with:
name: ${{ env.VERSION }}_${{ matrix.job.target }}_binary
name: ${{ env.VERSION }}_${{ matrix.job.target }}_deb
path: |
${{ env.TAR_LIVE777_NAME }}
${{ env.TAR_LIVEMAN_NAME }}
${{ env.PKG_WHEPFROM_NAME }}
${{ env.PKG_WHIPINTO_NAME }}
${{ env.PKG_NET4MQTT_NAME }}
*.deb
- name: Artifact Upload debian
- name: Artifact Upload rpm package
uses: actions/upload-artifact@v4
if: ${{ matrix.job.nfpm }}
with:
name: ${{ env.VERSION }}_${{ matrix.job.target }}_debian
name: ${{ env.VERSION }}_${{ matrix.job.target }}_rpm
path: |
*.deb
*.rpm
- name: Artifact Upload archlinux package
uses: actions/upload-artifact@v4
if: ${{ matrix.job.nfpm }}
with:
name: ${{ env.VERSION }}_${{ matrix.job.target }}_archlinux
path: |
*.pkg.tar.zst
- name: Upload release archive
shell: bash
if: github.ref_type == 'tag'
run: gh release upload ${{ env.VERSION }} ${{ env.TAR_LIVE777_NAME }} ${{ env.TAR_LIVEMAN_NAME }} ${{ env.PKG_WHEPFROM_NAME }} ${{ env.PKG_WHIPINTO_NAME }} ${{ env.PKG_NET4MQTT_NAME }} *.deb
run: gh release upload ${{ env.VERSION }} ${{ env.TAR_LIVE777_NAME }} ${{ env.TAR_LIVEMAN_NAME }} ${{ env.PKG_WHEPFROM_NAME }} ${{ env.PKG_WHIPINTO_NAME }} ${{ env.PKG_NET4MQTT_NAME }} *.deb *.rpm *.pkg.tar.zst
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit b8186fd

Please sign in to comment.