Skip to content

Commit

Permalink
added support for --as:
Browse files Browse the repository at this point in the history
  • Loading branch information
drkameleon committed May 21, 2024
1 parent 6ff4548 commit 0ce6f9b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
entry: tests/testbundle.art
target: testbundlex

- name: Run tests
run: |
./testbundle
./testbundlex
shell: bash

26 changes: 19 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ inputs:
description: >-
Entry file for the executable.
required: true
target:
description: >-
The name of the final binary.
default: 'auto'
runs:
using: "composite"
steps:
Expand All @@ -26,19 +30,27 @@ runs:
- name: Generate executable (*nix)
if: runner.os != 'Windows'
run: |
arturo --bundle ${{ inputs.entry }}
entry="${{ inputs.entry }}"
xbase=${entry##*/}
xpref=${xbase%.*}
sudo chmod +x $xpref
if [ "${{ inputs.target }}" = "auto" ]; then
arturo --bundle ${{ inputs.entry }}
entry="${{ inputs.entry }}"
xbase=${entry##*/}
xpref=${xbase%.*}
sudo chmod +x $xpref
else
arturo --bundle --as:${{ inputs.target }} ${{ inputs.entry }}
sudo chmod +x ${{ inputs.target }}
fi
shell: bash

- name: Generate executable (Windows)
if: runner.os == 'Windows'
run: |
export PATH="${{ github.workspace }}/nim/nim-2.0.4/bin":$PATH
arturo --bundle ${{ inputs.entry }}
if [ "${{ inputs.target }}" = "auto" ]; then
arturo --bundle ${{ inputs.entry }}
else
arturo --bundle --as:${{ inputs.target }} ${{ inputs.entry }}
fi
shell: msys2 {0}

branding:
Expand Down

0 comments on commit 0ce6f9b

Please sign in to comment.