Skip to content

Commit

Permalink
Add PR trigger for package workflow (#1302)
Browse files Browse the repository at this point in the history
* add trigger for PRs

* fix the path

* change vm to ubuntu-latest

* upload artifacts only for tags

---------

Co-authored-by: seladb <pcapplusplus@gmail.com>
  • Loading branch information
egecetin and seladb authored Feb 10, 2024
1 parent 7d806e8 commit 3e66fe4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
tags:
- '*'
pull_request:
paths:
# Also run this workflow when this package.yml is update by a PR
- '.github/workflows/package.yml'

env:
BUILD_DIR: Dist
Expand Down Expand Up @@ -54,6 +58,7 @@ jobs:
run: cmake --build "$BUILD_DIR" --target package

- name: Upload binaries to release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
draft: true
Expand All @@ -62,7 +67,7 @@ jobs:
artifacts: "${{ env.BUILD_DIR }}/*.tar.gz,${{ env.BUILD_DIR }}/*.deb,${{ env.BUILD_DIR }}/*.rpm"

freebsd:
runs-on: macos-12
runs-on: ubuntu-latest
strategy:
matrix:
include:
Expand All @@ -86,6 +91,7 @@ jobs:
cmake --build "$BUILD_DIR" --target package
- name: Upload binaries to release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
draft: true
Expand Down Expand Up @@ -119,6 +125,7 @@ jobs:
run: cmake --build "$BUILD_DIR" --target package

- name: Upload binaries to release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
draft: true
Expand Down Expand Up @@ -179,6 +186,7 @@ jobs:
run: cmake --build "$BUILD_DIR" --target package

- name: Upload binaries to release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
draft: true
Expand Down Expand Up @@ -218,6 +226,7 @@ jobs:
run: cmake --build "$env:BUILD_DIR" --config ${{ matrix.configuration }} --target package

- name: Upload binaries to release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
draft: true
Expand Down Expand Up @@ -296,6 +305,7 @@ jobs:
echo "PACKAGE_DIR=$PACKAGE_DIR" >> $GITHUB_ENV
tar cvf "${PACKAGE_DIR}.tar.gz" "${PACKAGE_DIR}"
- name: Upload binaries to release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
draft: true
Expand Down

0 comments on commit 3e66fe4

Please sign in to comment.