Skip to content

fix: CI name

fix: CI name #22

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Create release
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
tags: [ "v*" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
version: ["ubuntu:noble", "ubuntu:jammy", "ubuntu:focal", "debian:trixie", "debian:bookworm", "debian:bullseye"]
fail-fast: false
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
uses: actions/checkout@v4
- name: "Compile ${{ matrix.version }} on ${{ matrix.os }}"
run: |
./pullsrc.sh
docker run --rm -v ${{ github.workspace }}:/work -w /work library/${{ matrix.version }} bash -c "./install_deps.sh && ./compile.sh"
- name: "Install test with ${{ matrix.version }}"
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: Pack .deb files into tar.gz
id: pack
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
SAFE_VERSION=$(echo "${{ matrix.version }}" | sed 's/:/-/g')
echo "artifact_name=${SAFE_VERSION}-${{ matrix.os }}" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: upload-${{ steps.pack.outputs.artifact_name }}
path: ${{ github.workspace }}/openssh-*.tar.gz
create_release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all archives
uses: actions/download-artifact@v4
with:
path: ./output
merge-multiple: true
- name: Get tag message
run: |
echo -e "> Automated release created by GitHub Actions.\n" > ${{ github.workspace }}/RELEASE.md
GITHUB_REF=${{ github.ref }}
TAG_NAME="${GITHUB_REF#refs/tags/}"
git tag -l --format='%(contents)' "${TAG_NAME}" | tee -a ${{ github.workspace }}/RELEASE.md
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
artifacts: "${{ github.workspace }}/output/*.tar.gz"
bodyFile: ${{ github.workspace }}/RELEASE.md
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true