Branch
Hash :
1c0ad34c
Author :
Date :
2025-08-13T22:12:33
github: add some extra jobs to publish tarball/msi on github Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
name: Generate and upload release tarballs
on:
push:
tags:
- 'pkgconf-*'
jobs:
publish:
runs-on: ubuntu-latest
container:
image: alpine:latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: pkgconf/pkgconf
- name: Update system and add dependencies
run: |
apk update
apk add kyua atf build-base autoconf automake libtool xz gzip openssh-client
- name: Bootstrap autotools
run: |
sh autogen.sh
./configure
- name: Run tests and generate dist tarballs
run: |
make distcheck -j$(nproc)
- 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" *.tar* kaniini@distfiles.ariadne.space:distfiles/pkgconf/
# Delete the key material.
rm -rf $HOME/.ssh
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tarball
path: pkgconf-*.tar.*
build-msi:
name: Build MSI
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include: [
{ msystem: MINGW64, arch: x86_64},
]
steps:
- uses: actions/checkout@v4
- name: setup-msys2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: >-
mingw-w64-${{ matrix.arch }}-meson
mingw-w64-${{ matrix.arch }}-ninja
mingw-w64-${{ matrix.arch }}-gcc
mingw-w64-${{ matrix.arch }}-msitools
- name: Build
shell: msys2 {0}
run: |
# the code assumes msvc style printf atm
export CFLAGS=-D__USE_MINGW_ANSI_STDIO=0
meson _build --buildtype=release -Dtests=disabled -Db_lto=true
meson compile -C _build msi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: msi
path: _build/pkgconf-*.msi
release:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
needs: [publish, build-msi]
steps:
- name: Download tarball artifact
uses: actions/download-artifact@v4
with:
name: tarball
path: dist
- name: Download msi artifact
uses: actions/download-artifact@v4
with:
name: msi
path: dist
- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/pkgconf-*.tar.*
dist/pkgconf-*.msi