Skip to content

Update release.yaml

Update release.yaml #3

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*' # Trigger on version tags
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up CMake
uses: lukka/get-cmake@latest
- name: Configure CMake
run: cmake -B build -S . -A x64
- name: Build
run: cmake --build build --config Release
- name: Create artifact
uses: actions/upload-artifact@v2
with:
name: windows-executable
path: build/Release/Chip8Emu.exe
build-macos:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up CMake
uses: lukka/get-cmake@latest
- name: Configure CMake
run: cmake -B build -S .
- name: Build
run: cmake --build build --config Release
- name: Create artifact
uses: actions/upload-artifact@v2
with:
name: macos-executable
path: build/Chip8Emu
release:
runs-on: ubuntu-latest
needs: [build-windows, build-macos]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download Windows artifact
uses: actions/download-artifact@v2
with:
name: windows-executable
path: ./release
- name: Download macOS artifact
uses: actions/download-artifact@v2
with:
name: macos-executable
path: ./release
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
files: |
release/Chip8Emu.exe
release/Chip8Emu