Skip to content

Autobuy: Typos causing incorrect config file to be generated (#379) #120

Autobuy: Typos causing incorrect config file to be generated (#379)

Autobuy: Typos causing incorrect config file to be generated (#379) #120

Workflow file for this run

name: build
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M')"
- name: Extract information from CHANGELOG.md
id: extract_changelog
shell: bash
run: |
res=$''
changelog="$(cat CHANGELOG.md)"
while read -r line; do
if [[ "$line" =~ ^##[[:space:]][[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ ]]; then
if [ -z "$version" ]; then
version=${line:2}
else
break
fi
else
if [ ! -z "$version" ]; then
res+="${line//\r@Q}\n"
fi
fi
done < CHANGELOG.md
echo -e "version<<EOF"$'\n'"$version"$'\n'EOF >> $GITHUB_OUTPUT
echo -e "body<<EOF"$'\n'$res$'\n'EOF >> $GITHUB_OUTPUT
- run: vcpkg integrate install
- uses: ilammy/[email protected]
with:
arch: x86
- name: Compile FLHook
run: msbuild.exe "${env:GITHUB_WORKSPACE}\project\FLHook.sln" /t:Build /p:Configuration=Release /p:Platform=Win32
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.date.outputs.date }}
release_name: "${{ steps.extract_changelog.outputs.version }} | ${{ steps.date.outputs.date }}"
body: |
${{ steps.extract_changelog.outputs.body }}
draft: false
prerelease: false
- name: Remove .pdb files
run: |
del /S *.pdb
shell: cmd
- name: Remove template .dll
run: |
del /S $safeprojectname$.dll
shell: cmd
- name: Zip dlls
run: |
powershell Compress-Archive -Path .\dist\Release -DestinationPath .\Release.zip
- name: Upload Release Asset
id: 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: ./Release.zip
asset_name: Release.zip
asset_content_type: application/zip