Skip to content

Commit

Permalink
Automated Builds
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielLMcGuire committed Jul 24, 2024
1 parent 63f49a9 commit 2b74bf0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build and Release

on:
push:
branches:
- main # or the branch you want to trigger the workflow on

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up MinGW
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64

- name: Install GCC
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm mingw-w64-x86_64-gcc
- name: Build executable
run: |
g++ -o YTCompression.exe src/YTCompression.cpp
- name: Get version number
id: get_version
run: |
$VERSION = Get-Content src/version.txt
Write-Output "VERSION=$VERSION" | Out-File -Append -FilePath $env:GITHUB_ENV
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
body: 'Release of version ${{ env.VERSION }}'

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./YTCompression.exe
asset_name: YTCompression.exe
asset_content_type: application/octet-stream
1 change: 1 addition & 0 deletions src/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0.7.2430

0 comments on commit 2b74bf0

Please sign in to comment.