mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/boypt/openssh-deb.git
synced 2026-09-20 08:03:46 +08:00
gh: release a tar pkg for each os
This commit is contained in:
25
.github/workflows/create-release.yml
vendored
25
.github/workflows/create-release.yml
vendored
@@ -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
|
||||
Reference in New Issue
Block a user