Skip to content

Add zip step to release.yml #2

Add zip step to release.yml

Add zip step to release.yml #2

Workflow file for this run

# SPDX-FileCopyrightText: 2023 C. J. Howard
# SPDX-License-Identifier: CC0-1.0
name: release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
build_platform: "windows"
build_arch: "x64"
build_gen: "Visual Studio 17 2022"
# - os: ubuntu-latest
# build_platform: "linux"
# build_arch: "x64"
# build_gen: "Unix Makefiles"
steps:
- uses: actions/checkout@v3
- name: CMake configure
run: cmake -B build -G "${{matrix.build_gen}}" -A "${{matrix.build_arch}}"
- name: CMake build
run: cmake --build build --config Release
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: ${{matrix.build_platform}}-${{matrix.build_arch}}
path: |
build/Release
release:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
- name: Zip builds
run: zip ${{github.event.repository.name}}-${{github.ref_name}}-windows-x64.zip windows-x64/* -r
- name: Create release
uses: softprops/action-gh-release@v1
with:
files: |
${{github.event.repository.name}}-${{github.ref_name}}-windows-x64.zip