summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormayeut <mayeut@users.noreply.github.com>2021-12-04 11:30:29 +0100
committermayeut <mayeut@users.noreply.github.com>2021-12-04 20:18:34 +0100
commite406d98d47fcbeb45fd38be16797f2f438912abc (patch)
treea075cdf993153e6ee8d03255a45f8f3945f8e93c
parent2ac5798fdc79762ceee520b2b3b4758f7f97b17e (diff)
ci: split building & publishing tarballs
This allows testing the tarball builds on each commit.
-rw-r--r--.github/workflows/publish.yml22
1 files changed, 20 insertions, 2 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index ec3119d..9c9ed61 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -1,12 +1,15 @@
name: Publish
on:
+ pull_request:
push:
+ branches:
+ - '*'
tags:
- '*'
jobs:
- build:
- name: Publish tarballs
+ build_tarballs:
+ name: Build tarballs
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -17,6 +20,21 @@ jobs:
nix-build -A hydraJobs.tarball
install -D ./result/tarballs/*.tar.bz2 ./dist/patchelf-$(cat version).tar.bz2
install -D ./result/tarballs/*.tar.gz ./dist/patchelf-$(cat version).tar.gz
+ - uses: actions/upload-artifact@v2
+ with:
+ name: patchelf
+ path: dist/*
+
+ publish:
+ name: Publish tarballs
+ needs: [build_tarballs]
+ if: github.event_name == 'push' && github.repository == 'NixOS/patchelf' && startsWith(github.ref, 'refs/tags/')
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/download-artifact@v2
+ with:
+ name: patchelf
+ path: dist
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with: