From c1cd62483cb06decf9a3e0162cac0d58b50ec63c Mon Sep 17 00:00:00 2001 From: Selimaj Dev Date: Tue, 5 May 2026 23:14:48 +0200 Subject: [PATCH] Added release workflow --- .github/workflows/release.yml | 56 +++++++++++++++++++++++++++++++++++ test/src/main.mist | 1 + 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9d0800f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +name: Release Build + +on: + release: + types: [published] + workflow_dispatch: + inputs: + tag: + description: "Release tag to upload to (e.g. 0.1.0)" + required: false + type: string + +jobs: + build: + name: Build (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + + - name: Build release binary + run: cargo build --release + + # --- Get release tag --- + - name: Get release tag + id: get_tag + shell: bash + run: | + TAG="${{ inputs.tag }}" + + if [ "${{ github.event_name }}" = "release" ]; then + TAG="${{ github.event.release.tag_name }}" + elif [ -z "$TAG" ]; then + TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) + fi + + echo "tag=$TAG" >> $GITHUB_OUTPUT + + - name: Upload to GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.get_tag.outputs.tag }} + files: | + target/release/mist* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/test/src/main.mist b/test/src/main.mist index 28009dc..811a162 100644 --- a/test/src/main.mist +++ b/test/src/main.mist @@ -13,4 +13,5 @@ class MyClass { void main() { var my_class = new MyClass("World"); my_class.greet(); + var x = 1 + 2 + 3; }