Skip to content

Commit e406d98

Browse files
committed
ci: split building & publishing tarballs
This allows testing the tarball builds on each commit.
1 parent 2ac5798 commit e406d98

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/publish.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
name: Publish
22
on:
3+
pull_request:
34
push:
5+
branches:
6+
- '*'
47
tags:
58
- '*'
69

710
jobs:
8-
build:
9-
name: Publish tarballs
11+
build_tarballs:
12+
name: Build tarballs
1013
runs-on: ubuntu-latest
1114
steps:
1215
- name: Checkout
@@ -17,6 +20,21 @@ jobs:
1720
nix-build -A hydraJobs.tarball
1821
install -D ./result/tarballs/*.tar.bz2 ./dist/patchelf-$(cat version).tar.bz2
1922
install -D ./result/tarballs/*.tar.gz ./dist/patchelf-$(cat version).tar.gz
23+
- uses: actions/upload-artifact@v2
24+
with:
25+
name: patchelf
26+
path: dist/*
27+
28+
publish:
29+
name: Publish tarballs
30+
needs: [build_tarballs]
31+
if: github.event_name == 'push' && github.repository == 'NixOS/patchelf' && startsWith(github.ref, 'refs/tags/')
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/download-artifact@v2
35+
with:
36+
name: patchelf
37+
path: dist
2038
- name: Upload binaries to release
2139
uses: svenstaro/upload-release-action@v2
2240
with:

0 commit comments

Comments
 (0)