Skip to content

Commit

Permalink
Update c-cpp.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxWasTakenYT committed Aug 21, 2024
1 parent 6704ea4 commit e65e8ad
Showing 1 changed file with 36 additions and 10 deletions.
46 changes: 36 additions & 10 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,53 @@
name: C/C++ CI
name: Build and Release JMCompiler CLI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Print working directory
run: echo $PWD

- name: List files in working directory
run: dir

- name: Build with MSBuild
- name: Setup MSBuild
run: |
& "C:\Program Files\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe" JMCompiler.sln /p:Configuration=Release
- name: Run tests
run: ctest --output-on-failure
- name: Create Release Directory
run: mkdir release

- name: Copy Build Artifacts
run: |
copy /y JMCompiler\Release\*.* release\
- name: Archive Artifacts
uses: actions/upload-artifact@v3
with:
name: JMDash-Build
path: release/

release:
needs: build
runs-on: windows-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: JMCompiler-CLI-Build

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 'cli-release'
release_name: 'JMCompiler CLI'
draft: true
prerelease: false
files: release\*

0 comments on commit e65e8ad

Please sign in to comment.