diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5d3257c..b159ee7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -36,12 +36,22 @@ jobs: if: matrix.os != 'windows-latest' run: | cd tahini + VERSION=${{ github.ref_name }} + SAFEVERSION=${VERSION//./-} if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then - mv tahini tahini-linux + mv tahini tahini-linux-${SAFEVERSION} elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then - mv tahini tahini-macos + mv tahini tahini-macos-${SAFEVERSION} fi + - name: Rename binary for unique names on Windows + if: matrix.os == 'windows-latest' + run: | + cd tahini + $VERSION = "${{ github.ref_name }}" + $SAFEVERSION = $VERSION -replace '\.', '-' + Rename-Item -Path "tahini.exe" -NewName "tahini-windows-$SAFEVERSION.exe" + - name: Upload binary uses: actions/upload-artifact@v4 with: @@ -57,14 +67,22 @@ jobs: with: path: . + - name: Set Version Variable + id: set_version + run: | + # Replace dots with hyphens in the version name + VERSION="${{ github.ref_name }}" + VERSION=${VERSION//./-} + echo "VERSION=${VERSION}" >> $GITHUB_ENV + - name: Create Release uses: softprops/action-gh-release@v1 with: generate_release_notes: true prerelease: ${{ contains(github.ref, 'beta') }} files: | - tahini-ubuntu-latest/tahini-linux - tahini-macos-latest/tahini-macos - tahini-windows-latest/tahini.exe + tahini-ubuntu-latest/tahini-linux-${{ env.VERSION }} + tahini-macos-latest/tahini-macos-${{ env.VERSION }} + tahini-windows-latest/tahini-windows-${{ env.VERSION }}.exe env: GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/README.md b/README.md index 8977e2b..b287585 100644 --- a/README.md +++ b/README.md @@ -72,10 +72,7 @@ Planned features include an import system, standard library, and cross-language You can download the latest prebuilt binaries for your operating system from the [Releases](https://github.com/anirudhgray/tahini-lang/releases) page. Follow these steps to get started quickly. -1. Download the Latest Binary - - Linux: [tahini-ubuntu-latest](https://github.com/anirudhgray/tahini-lang/releases/download/v0.0.1/tahini-linux) - - macOS: [tahini-macos-latest](https://github.com/anirudhgray/tahini-lang/releases/download/v0.0.1/tahini-macos) - - Windows: [tahini-windows-latest.exe](https://github.com/anirudhgray/tahini-lang/releases/download/v0.0.1/tahini.exe) +1. Download the Latest Binary for your OS: [Latest Release](https://github.com/anirudhgray/tahini-lang/releases/latest) 2. Make the Binary Executable (Linux/macOS) ```bash @@ -83,7 +80,7 @@ chmod +x tahini-linux # For Linux chmod +x tahini-macos # For macOS ``` -3. Run Tahini (start up the REPL) +1. Run Tahini (start up the REPL) ```bash ./tahini-linux # For Linux ./tahini-macos # For macOS @@ -92,7 +89,7 @@ Welcome to Tahini. Type in your code below: > ``` -4. Run Tahini Code (execute a Tahini script from file) +1. Run Tahini Code (execute a Tahini script from file) ```bash ./tahini-linux path/to/file.tah # For Linux ./tahini-macos path/to/file.tah # For macOS