compiling web_search.exe #4
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: compiling web_search.exe to windows x64 | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-pc-windows-msvc | |
| - name: Build release binary | |
| working-directory: ./web_search | |
| run: cargo build --release --target x86_64-pc-windows-msvc | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: web_search-x64 | |
| path: web_search/target/x86_64-pc-windows-msvc/release/web_search.exe | |
| - name: Get version from Cargo.toml | |
| id: version | |
| shell: pwsh | |
| run: | | |
| $cargoContent = Get-Content web_search/Cargo.toml -Raw | |
| $version = [regex]::Match($cargoContent, 'version\s*=\s*"([^"]+)"').Groups[1].Value | |
| echo "VERSION=$version" >> $env:GITHUB_OUTPUT | |
| echo "Version: $version" | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.version.outputs.VERSION }} | |
| name: Release v${{ steps.version.outputs.VERSION }} | |
| files: web_search/target/x86_64-pc-windows-msvc/release/web_search.exe | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |