Skip to content

Commit

Permalink
feat: releases
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisAMJ committed Jul 30, 2024
1 parent 3700e6a commit 6269481
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 3 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: CD

on:
push:
tags: '*'

jobs:
build-lin:
name: Linux Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Makefile
run: |
echo "CFLAGS=-Wall -Werror" > config.mk
echo "LDFLAGS=-lm -fsanitize=address" >> config.mk
- name: Build
run: make
- name: Run
run: chmod +x mdp && ./mdp
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: mdp-linux
path: mdp
if-no-files-found: error
build-win:
name: Windows Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-mingw-w64
- name: Configure Makefile
run: |
echo "CC=x86_64-w64-mingw32-gcc" > config.mk
echo "CFLAGS=-Wall -Werror -D__USE_MINGW_ANSI_STDIO" >> config.mk
echo "LDFLAGS=-lm" >> config.mk
- name: Build
run: make
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: mdp-windows
path: mdp.exe
if-no-files-found: error
release:
name: Release
if: github.repository == 'p2sr/mdp'
needs: [build-lin, build-win]
runs-on: ubuntu-latest
steps:
- name: Get Release Version
id: get_release
run: echo ::set-output name=version::${GITHUB_REF:10}
- name: Download Linux Build
uses: actions/download-artifact@v4
with:
name: mdp-linux
- name: Download Windows Build
uses: actions/download-artifact@v4
with:
name: mdp-windows
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body: |
![CD](https://github.com/p2sr/mdp/workflows/CD/badge.svg)
**Installation**
- Download:
- [Windows](https://github.com/p2sr/mdp/releases/download/${{ steps.get_release.outputs.version }}/mdp.exe)
- [Linux](https://github.com/p2sr/mdp/releases/download/${{ steps.get_release.outputs.version }}/mdp)
- Run `chmod +x mdp`
---
**Changelog**
TODO
files: |
mdp
mdp.exe
prerelease: false
fail_on_unmatched_files: true
5 changes: 2 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ on:
- "src/**/*.h"
workflow_dispatch:

permissions:
contents: read

jobs:
build-lin:
name: Linux Build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -40,6 +38,7 @@ jobs:
path: mdp
if-no-files-found: error
build-win:
name: Windows Build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# mdp

[![CI](https://github.com/p2sr/mdp/workflows/CI/badge.svg)](https://github.com/p2sr/mdp/actions?query=workflow%3ACI+branch%3Amaster)
[![CD](https://github.com/p2sr/mdp/workflows/CD/badge.svg)](https://github.com/p2sr/mdp/actions?query=workflow%3ACD+branch%3Amaster)

`mdp` is a very simple demo parser for Portal 2 demos which extracts information injected by [SAR].

Expand Down

0 comments on commit 6269481

Please sign in to comment.