Skip to content

Commit

Permalink
makes pipeline upload assets following builds on main
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNotary committed Sep 5, 2024
1 parent e852960 commit c480527
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 11 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/hosted-ninja-vcpkg_submod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ on:
push:
pull_request:
branches:
- v11
- 'v*'
- main
- test-pipeline
workflow_dispatch:
schedule:
- cron: '0 1 * * *'
Expand Down Expand Up @@ -54,15 +55,19 @@ jobs:
with:
vcpkgJsonGlob: 'vcpkg.json'

# Note: if the preset misses the "configuration", it is possible to explicitly select the
# configuration with the additional `--config` flag, e.g.:
# buildPreset: 'ninja-vcpkg'
# buildPresetAdditionalArgs: "[`--config`, `Release`]"
# testPreset: 'ninja-vcpkg'
# testPresetAdditionalArgs: "[`--config`, `Release`]"
- name: Run CMake+vcpkg+Ninja+CTest to build packages and generate/build/test the code.
uses: lukka/run-cmake@v10
with:
configurePreset: 'release-config'
buildPreset: 'release-build'
testPreset: 'test-release'

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
builds/release-config/Release/*.exe
builds/release-config/Release/*.dll
- run: ls -R
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
include:
- os: windows-latest
triplet: x64-windows
- os: ubuntu-latest
triplet: x64-linux
- os: macos-latest
triplet: x64-osx
# - os: ubuntu-latest
# triplet: x64-linux
# - os: macos-latest
# triplet: x64-osx
env:
# Indicates the location of the vcpkg as a Git submodule of the project repository.
# Not using "VCPKG_ROOT" because a variable with the same name is defined in the VS's
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/upload-release-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Upload-Release

on:
workflow_run:
workflows: ["hosted-ninja-vcpkg_submod-autocache"]
branches:
- main
- test-pipeline
types:
- completed
# push:
# tags:
# - "v*.*.*"

jobs:
publish:
name: Upload Release
runs-on: ubuntu-latest

steps:
- name: Download artifact from build
uses: actions/download-artifact@v4
# with:
# path: my-artifact
# pattern: my-artifact-*

- run: ls -R

- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
builds/release-config/Release/*.exe
builds/release-config/Release/*.dll

0 comments on commit c480527

Please sign in to comment.