Skip to content

Commit

Permalink
Create release-mac.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pahaze authored Jan 11, 2023
1 parent 3d21e62 commit ba8f5d5
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/release-mac.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ba8f5d5

Please sign in to comment.