Create release.yaml #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| release: | |
| name: Build and Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v3 | |
| - name: Set up CMake | |
| uses: jwlawson/actions-setup-cmake@v1.14 | |
| with: | |
| cmake-version: '3.25.2' | |
| - name: Install Ninja | |
| run: sudo apt-get update && sudo apt-get install -y ninja-build | |
| - name: Configure with CMake | |
| run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release | |
| - name: Build Tiny BPE Trainer | |
| run: cmake --build build | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload Release Asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| build/Tiny-BPE-Trainer | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |