11name : Publish
22on :
33 pull_request :
4+ merge_group :
45 push :
56 branches :
67 - ' *'
@@ -13,44 +14,44 @@ jobs:
1314 runs-on : ubuntu-latest
1415 steps :
1516 - name : Checkout
16- uses : actions/checkout@v3
17- - uses : cachix/install-nix-action@v20
17+ uses : actions/checkout@v4
18+ - uses : cachix/install-nix-action@v31
1819 - name : Build tarballs
1920 run : |
2021 nix build -L .#hydraJobs.tarball
2122 install -D ./result/tarballs/*.tar.bz2 ./dist/patchelf-$(cat version).tar.bz2
2223 install -D ./result/tarballs/*.tar.gz ./dist/patchelf-$(cat version).tar.gz
23- - uses : actions/upload-artifact@v3
24+ - uses : actions/upload-artifact@v4
2425 with :
25- name : patchelf
26+ name : patchelf-tarball
2627 path : dist/*
2728
2829 build_windows :
2930 name : Build windows executable
3031 runs-on : ubuntu-latest
3132 steps :
3233 - name : Checkout
33- uses : actions/checkout@v3
34- - uses : cachix/install-nix-action@v20
34+ uses : actions/checkout@v4
35+ - uses : cachix/install-nix-action@v31
3536 - name : Build windows executable
3637 run : |
3738 nix build -L .#patchelf-win32 .#patchelf-win64
3839 install -D ./result/bin/patchelf.exe ./dist/patchelf-win32-$(cat version).exe
3940 install -D ./result-1/bin/patchelf.exe ./dist/patchelf-win64-$(cat version).exe
40- - uses : actions/upload-artifact@v3
41+ - uses : actions/upload-artifact@v4
4142 with :
42- name : patchelf
43+ name : patchelf-windows
4344 path : dist/*
4445
4546 test_windows :
4647 name : Test windows binaries
4748 needs : [build_windows]
4849 runs-on : windows-latest
4950 steps :
50- - uses : actions/checkout@v3
51- - uses : actions/download-artifact@v3
51+ - uses : actions/checkout@v4
52+ - uses : actions/download-artifact@v5
5253 with :
53- name : patchelf
54+ name : patchelf-windows
5455 path : dist
5556 - name : Show binaries
5657 run : dir .\\dist
@@ -71,11 +72,21 @@ jobs:
7172 steps :
7273 - name : Set up QEMU
7374 if : matrix.platform != 'amd64'
74- uses : docker/setup-qemu-action@v2
75+ uses : docker/setup-qemu-action@v3
7576
76- - uses : actions/download-artifact@v3
77+ - name : Set docker arch
78+ run : |
79+ platform=${{ matrix.platform }}
80+ if [[ $platform == arm64v8 ]]; then
81+ platform=arm64
82+ elif [[ $platform == arm32v7 ]]; then
83+ platform=arm
84+ fi
85+ echo "DOCKER_PLATFORM=$platform" >> $GITHUB_ENV
86+
87+ - uses : actions/download-artifact@v5
7788 with :
78- name : patchelf
89+ name : patchelf-tarball
7990 path : dist
8091 - name : Build binaries
8192 env :
@@ -100,7 +111,7 @@ jobs:
100111 else
101112 ENTRYPOINT=
102113 fi
103- docker run -e CXXFLAGS -v $(pwd):/gha ${{ matrix.platform }}/alpine:edge ${ENTRYPOINT} sh -ec "cd /gha && sh ./build.sh"
114+ docker run --platform "$DOCKER_PLATFORM" - e CXXFLAGS -v $(pwd):/gha ${{ matrix.platform }}/alpine:edge ${ENTRYPOINT} sh -ec "cd /gha && sh ./build.sh"
104115 - name : Check binaries
105116 run : |
106117 cat <<EOF > check.sh
@@ -109,10 +120,10 @@ jobs:
109120 tar -xf ./dist/patchelf-*-*.tar.gz
110121 ./bin/patchelf --version
111122 EOF
112- docker run -v $(pwd):/gha ${{ matrix.platform }}/debian:unstable-slim sh -ec "cd /gha && sh ./check.sh"
113- - uses : actions/upload-artifact@v3
123+ docker run --platform "$DOCKER_PLATFORM" - v $(pwd):/gha ${{ matrix.platform }}/debian:unstable-slim sh -ec "cd /gha && sh ./check.sh"
124+ - uses : actions/upload-artifact@v4
114125 with :
115- name : patchelf
126+ name : patchelf-${{ matrix.platform }}
116127 path : dist/*
117128
118129 publish :
@@ -121,9 +132,10 @@ jobs:
121132 if : github.event_name == 'push' && github.repository == 'NixOS/patchelf' && startsWith(github.ref, 'refs/tags/')
122133 runs-on : ubuntu-latest
123134 steps :
124- - uses : actions/download-artifact@v3
135+ - uses : actions/download-artifact@v5
125136 with :
126- name : patchelf
137+ pattern : patchelf-*
138+ merge-multiple : true
127139 path : dist
128140 - name : Upload binaries to release
129141 uses : svenstaro/upload-release-action@v2
0 commit comments