Skip to content

Merge pull request #27 from hetulbhatt/main #17

Merge pull request #27 from hetulbhatt/main

Merge pull request #27 from hetulbhatt/main #17

Workflow file for this run

name: Create Release
on:
push:
branches:
- main
- build
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
architecture:
- x86
- x64
- ARM
- ARM64
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up environment
run: echo "Running on Windows - ${{ matrix.architecture }}"
- name: Install MSVC
uses: microsoft/setup-msbuild@v1
- name: Build
run: cl /EHsc /I.\include /Fe:KeyFlow-${{ matrix.architecture }}.exe src\main.cpp user32.lib
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: KeyFlow-windows-${{ matrix.architecture }}-executable
path: KeyFlow-${{ matrix.architecture }}.exe
create_release:
needs: build
runs-on: windows-latest
steps:
- name: Create Workspace
run: mkdir workspace
- name: Checkout code
uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: workspace
- name: Display structure of downloaded files
run: tree .
- name: Determine Alpha Version
id: determine_alpha_version
run: |
echo "::set-output name=ALPHA_VERSION::alpha.$(date +%Y%m%d).${{ github.run_number }}"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.0.0-${{ steps.determine_alpha_version.outputs.ALPHA_VERSION }}
release_name: Release v1.0.0-${{ steps.determine_alpha_version.outputs.ALPHA_VERSION }}
body: |
This is an alpha release for version ${{ steps.determine_alpha_version.outputs.ALPHA_VERSION }}
draft: false
prerelease: false
- name: Upload Build x86
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: workspace/KeyFlow-windows-x86-executable/KeyFlow-x86.exe
asset_name: KeyFlow-x86.exe
asset_content_type: application/octet-stream
- name: Upload Build x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: workspace/KeyFlow-windows-x64-executable/KeyFlow-x64.exe
asset_name: KeyFlow-x64.exe
asset_content_type: application/octet-stream
- name: Upload Build ARM
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: workspace/KeyFlow-windows-ARM-executable/KeyFlow-ARM.exe
asset_name: KeyFlow-ARM.exe
asset_content_type: application/octet-stream
- name: Upload Build ARM64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: workspace/KeyFlow-windows-ARM64-executable/KeyFlow-ARM64.exe
asset_name: KeyFlow-ARM64.exe
asset_content_type: application/octet-stream