From ba8f5d579cf29dfeab19181bc6cc2fd39bbf35b0 Mon Sep 17 00:00:00 2001 From: pahaze <69173292+pahaze@users.noreply.github.com> Date: Tue, 10 Jan 2023 20:31:11 -0500 Subject: [PATCH] Create release-mac.yml --- .github/workflows/release-mac.yml | 73 +++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/release-mac.yml diff --git a/.github/workflows/release-mac.yml b/.github/workflows/release-mac.yml new file mode 100644 index 0000000..bd088fa --- /dev/null +++ b/.github/workflows/release-mac.yml @@ -0,0 +1,73 @@ +# This is a basic workflow to help you get started with Actions + +name: Release (Mac) + +# Controls when the action will run. +on: + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + buildMac: + runs-on: macos-latest + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - uses: krdlab/setup-haxe@master + with: + haxe-version: 4.2.0 + # Runs a set of commands using the runners shell + - name: Install Haxelib + run: | + haxelib setup ~/haxelib + haxelib install hxcpp > /dev/null + haxelib install lime + haxelib install openfl + haxelib --never install flixel + haxelib run lime setup flixel + haxelib run lime setup + haxelib install flixel-tools + haxelib install flixel-ui + haxelib install flixel-addons + haxelib install tjson + haxelib install hxjsonast + haxelib git linc_luajit https://github.com/AndreiRudenko/linc_luajit + haxelib install hscript + haxelib git hscript-ex https://github.com/ianharrigan/hscript-ex + haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc + haxelib install hxcpp-debug-server + haxelib list + - name: Create Version Tag + run: echo "${{github.run_id}}" > VERSION + - name: Compile + run: haxelib run lime build mac --app-version="4.0.0-${{ github.run_id}}" + - name: Create release ZIP + uses: vimtor/action-zip@v1 + with: + files: export/release/macos/bin + dest: release-mac.zip + - name: Get Commit Hash + run: echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.SHORT_SHA }} + release_name: Release ${{ env.SHORT_SHA }} (Mac) + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./release-mac.zip + asset_name: release-mac.zip + asset_content_type: application/zip