Skip to content

Update README.md

Update README.md #35

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions:
contents: write
jobs:
release:
if: startsWith(github.event.head_commit.message, '[Release]')
strategy:
matrix:
os: [macos-12, macos-14, windows-latest, ubuntu-latest]
include:
- os: macos-12
bin_path: ./build/stockprice
compressed_name: stockprice-bin-Darwin-x86_64.tar.gz
- os: macos-14
bin_path: ./build/stockprice
compressed_name: stockprice-bin-Darwin-arm64.tar.gz
- os: windows-latest
bin_path: ./build/Release/stockprice.exe
compressed_name: stockprice-bin-windows-x86_64.zip
- os: ubuntu-latest
bin_path: ./build/stockprice
compressed_name: stockprice-bin-Linux-x86_64.tar.gz
runs-on: ${{ matrix.os }}
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- name: build
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
- name: Package
shell: bash
run: |
if [[ "${{ matrix.os }}" == "windows-latest" ]]
then
7z a ./${{ matrix.compressed_name }} ${{ matrix.bin_path }}
else
tar czvf ./${{ matrix.compressed_name }} ${{ matrix.bin_path }}
fi
ls -l
- name: Grab version from VERSION file
shell: bash
run: |
version=$(head -n 1 VERSION)
echo "Releasing for version $version"
echo "RELEASE_VERSION=$version" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v2
with:
files: 'stockprice-bin-*'
name: Release v${{ env.RELEASE_VERSION }}
tag_name: ${{ env.RELEASE_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}