/
githubmirror
/
pkgconf
Обзор
Документация
Войти
/
githubmirror
/
pkgconf
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/release-tarballs.yml
152 строки
4 KB
Elizabeth Kiara Regina Ashford
build: remove autotools support
14 июл 2026, 03:53
14 июл 2026, 03:53
372719b
Код
Авторство
О чём код?
name: Generate and upload release artifacts on: push: tags: - 'pkgconf-*' jobs: tarball: runs-on: ubuntu-latest container: image: alpine:latest steps: - name: Install git (required by actions/checkout and meson dist) run: | apk update apk add git # Container-mounted checkouts are owned by a different uid than # the one git operates as here, which trips git's dubious- # ownership check (CVE-2022-24765 mitigation) and breaks both # actions/checkout and meson dist's internal git invocations. git config --global --add safe.directory "*" - name: Checkout uses: actions/checkout@v2 with: repository: pkgconf/pkgconf - name: Update system and add dependencies run: | apk add build-base meson xz gzip tar openssh-client - name: Run tests and generate dist tarballs run: | meson setup _build -Dwerror=true meson dist -C _build cp _build/meson-dist/pkgconf-*.tar.* . - name: Upload artifact uses: actions/upload-artifact@v7 with: name: tarball path: pkgconf-*.tar.* msi: name: Build MSI (${{ matrix.name }}) strategy: fail-fast: false matrix: include: - name: win32-x86 runs_on: windows-2025 msbuild_arch: x86 - name: win64-x64 runs_on: windows-2025 msbuild_arch: x64 - name: win-arm64 runs_on: windows-11-arm msbuild_arch: arm64 runs-on: ${{ matrix.runs_on }} steps: - name: Checkout code uses: actions/checkout@v6 - name: Set up MSBuild uses: ilammy/msvc-dev-cmd@v1 with: arch: ${{ matrix.msbuild_arch }} - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.x" - name: Install Meson and Ninja shell: pwsh run: | python -m pip install --upgrade pip python -m pip install meson ninja - name: Install WiX run: | dotnet tool install --global wix $wixVersion = (wix --version).Trim() wix eula accept wix7 wix extension add -g "WixToolset.UI.wixext/$wixVersion" - name: Build run: | meson setup _build --vsenv --buildtype=release --default-library=static -Db_vscrt=static_from_buildtype meson compile -C _build msi - name: Upload artifact uses: actions/upload-artifact@v7 with: name: msi-${{ matrix.msbuild_arch }} path: _build/pkgconf-*.msi release: name: Create Release runs-on: ubuntu-latest permissions: contents: write needs: [tarball, msi] steps: - name: Download artifact(s) uses: actions/download-artifact@v8 with: path: dist merge-multiple: true - name: Create Release uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/') with: prerelease: true files: | dist/pkgconf-*.tar.* dist/pkgconf-*.msi publish: name: Publish on distfiles.ariadne.space runs-on: ubuntu-latest permissions: contents: write needs: [tarball, msi] steps: - name: Download artifact(s) uses: actions/download-artifact@v8 with: path: dist merge-multiple: true - name: Upload dist tarballs to distfiles.ariadne.space env: DISTFILES_PRIVATE_KEY: ${{ secrets.DISTFILES_PRIVATE_KEY }} DISTFILES_HOST_KEYS: ${{ secrets.DISTFILES_HOST_KEYS }} run: | mkdir -p $HOME/.ssh # Ensure the private key is read-only so SSH doesn't reject it. umask 277 (echo "$DISTFILES_PRIVATE_KEY" | base64 -d) > $HOME/.ssh/id_ed25519 umask 077 (echo "$DISTFILES_HOST_KEYS" | base64 -d) > $HOME/.ssh/known_hosts # Upload the tarballs. scp -i "$HOME/.ssh/id_ed25519" -o "UserKnownHostsFile=$HOME/.ssh/known_hosts" dist/* distfiles@distfiles.ariadne.space:/srv/distfiles/data/pkgconf/ # Delete the key material. rm -rf $HOME/.ssh