Skip to content

Update build.yml

Update build.yml #2

Workflow file for this run

name: Build and Release
on:
push:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Compile the C code
run: cl.exe /Fe:program.exe main.c
- name: Upload the executable as an artifact
uses: actions/upload-artifact@v2
with:
name: program
path: program.exe
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: program
- name: Create Release
id: 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: program.exe