Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #20

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #20

Workflow file for this run

name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
env:
BUILD_NUMBER: ${{ github.run_number }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
env:
BUILD_NUMBER: ${{ github.run_number }}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
env:
BUILD_NUMBER: ${{ github.run_number }}
- name: Install
working-directory: ${{github.workspace}}/build
run: cmake --install . --prefix ../dist/usr/local/ --verbose
- name: Package (Windows)
working-directory: ${{github.workspace}}/build
if: matrix.os == 'windows-latest'
run: cpack -C ${{env.BUILD_TYPE}} -G "ZIP"
env:
BUILD_NUMBER: ${{ github.run_number }}
- name: Package (macOS)
working-directory: ${{github.workspace}}/build
if: matrix.os == 'macOS-latest'
run: cpack -C ${{env.BUILD_TYPE}} -G "ZIP;TGZ;STGZ;productbuild"
env:
BUILD_NUMBER: ${{ github.run_number }}
- name: Package (Ubuntu)
working-directory: ${{github.workspace}}/build
if: matrix.os == 'ubuntu-latest'
run: cpack -C ${{env.BUILD_TYPE}} -G "DEB;ZIP;TGZ;RPM;STGZ"
env:
BUILD_NUMBER: ${{ github.run_number }}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: ${{github.workspace}}/dist/packages/*
retention-days: 5
publish:
name: "Publish"
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v4.1.7
with:
path: ${{github.workspace}}/dist/
- name: List files
run: ls -Rla ${{github.workspace}}/dist/
- name: Upload Release
run: gh release create --prerelease --latest --title "v0.1.${{github.run_number}}" --generate-notes "v0.1.${{github.run_number}}" ${{github.workspace}}/dist/**/*
env:
GITHUB_TOKEN: ${{ github.token }}