Skip to content

Commit

Permalink
GH Action: attach cbuild installer to release (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
brondani authored Sep 8, 2021
1 parent c3ecf23 commit 9864bd8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 19 deletions.
36 changes: 25 additions & 11 deletions .github/workflows/buildmgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@ on:
pull_request:
branches: [ main ]
paths:
- '.github/workflows/buildmgr.yml'
- 'CMakeLists.txt'
- 'libs/crossplatform/**'
- 'libs/errlog/**'
- 'libs/xmlreader/**'
- 'libs/xmltree/**'
- 'libs/xmltreeslim/**'
- 'libs/rteutils/**'
- 'libs/rtemodel/**'
- 'libs/rtefsutils/**'
- 'tools/buildmgr/**'
- '.github/workflows/buildmgr.yml'
- 'CMakeLists.txt'
- 'libs/crossplatform/**'
- 'libs/errlog/**'
- 'libs/xmlreader/**'
- 'libs/xmltree/**'
- 'libs/xmltreeslim/**'
- 'libs/rteutils/**'
- 'libs/rtemodel/**'
- 'libs/rtefsutils/**'
- 'tools/buildmgr/**'
release:
types: [published]

jobs:
build:
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/buildmgr/')) }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
Expand Down Expand Up @@ -95,6 +98,7 @@ jobs:
if-no-files-found: error

docs:
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/buildmgr/')) }}
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
Expand Down Expand Up @@ -204,6 +208,16 @@ jobs:
retention-days: 1
if-no-files-found: error

- name: Attach installer to release
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: tools/buildmgr/cbuildgen/installer/cbuild_install.sh
tag: ${{ github.ref }}
overwrite: true
asset_name: cbuild_install.sh

tests:
needs: [ create_installer ]
timeout-minutes: 15
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/packgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ on:
pull_request:
branches: [ main ]
paths:
- '.github/workflows/packgen.yml'
- 'CMakeLists.txt'
- 'libs/crossplatform/**'
- 'libs/rtefsutils/**'
- 'libs/xmlreader/**'
- 'libs/xmltree/**'
- 'libs/xmltreeslim/**'
- 'tools/packgen/**'
- '.github/workflows/packgen.yml'
- 'CMakeLists.txt'
- 'libs/crossplatform/**'
- 'libs/rtefsutils/**'
- 'libs/xmlreader/**'
- 'libs/xmltree/**'
- 'libs/xmltreeslim/**'
- 'tools/packgen/**'
release:
types: [published]

jobs:
build:
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/packgen/')) }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
Expand Down Expand Up @@ -97,6 +98,7 @@ jobs:
asset_name: packgen-${{ matrix.target }}

unittest:
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/packgen/')) }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
Expand Down

0 comments on commit 9864bd8

Please sign in to comment.