gh: release a tar pkg for each os

This commit is contained in:
boypt
2026-06-01 09:57:25 +08:00
parent f9f822979d
commit 65b2b8e0f7

View File

@@ -35,23 +35,30 @@ jobs:
run: |
docker run --rm -v ${{ github.workspace }}:/work -w /work library/${{ matrix.version }} bash -c "apt update && apt install -y --no-install-recommends ./output/*.deb && ssh -V"
- name: Set artifact name
id: artifact
run: echo "name=$(echo ${{ matrix.version }} | sed 's/:/-/g')-${{ matrix.os }}" >> $GITHUB_OUTPUT
- name: Pack .deb files into tar.gz
run: |
CODENAME=$(echo "${{ matrix.version }}" | cut -d':' -f2)
if [[ "${{ matrix.os }}" == *"-arm"* ]]; then
ARCH="arm64"
else
ARCH="amd64"
fi
cd ${{ github.workspace }}/output
tar -czf ../openssh-${CODENAME}-${ARCH}.tar.gz *.deb
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact.outputs.name }}
path: ${{ github.workspace }}/output/*.deb
name: ${{ matrix.version }}-${{ matrix.os }}
path: ${{ github.workspace }}/openssh-*.tar.gz
create_release:
# if: ${{ github.ref == 'refs/heads/master' }}
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
- name: Download all archives
uses: actions/download-artifact@v4
with:
path: ./output
@@ -68,7 +75,7 @@ jobs:
id: create_release
uses: ncipollo/release-action@v1
with:
artifacts: "${{ github.workspace }}/output/*.deb"
artifacts: "${{ github.workspace }}/output/*.tar.gz"
bodyFile: ${{ github.workspace }}/RELEASE.md
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
allowUpdates: true