Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: feat: composite action that wraps fog.buildtools #1

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
55 changes: 55 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: 'Build Plugin'
description: 'Build GOG Galaxy integration on current OS'

inputs:
src:
description: 'Location of directory containing manifest.json and essential plugin files'
required: true
default: 'src'
requirements:
description: 'Location of Python requirements file'
required: true
default: 'requirements/app.txt'
urwrstkn8mare marked this conversation as resolved.
Show resolved Hide resolved
output-zip-name:
description: 'Name of created zip that contains build plugin'
required: true
default: 'build.zip'
third-party-target:
description: 'Target directory where pip packages are dumped; relative to resulted build'
required: false
default: '.'
python-arch:
description: 'Python binary to be used: x64 for Mac or x86 for Windows'
required: true
UncleGoogle marked this conversation as resolved.
Show resolved Hide resolved

runs:
using: "composite"
steps:
UncleGoogle marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.7.5' # Version 3.7.3 used by GOG not avaialable https://github.com/actions/setup-python/issues/474
urwrstkn8mare marked this conversation as resolved.
Show resolved Hide resolved
UncleGoogle marked this conversation as resolved.
Show resolved Hide resolved
architecture: ${{ inputs.python-arch }}
UncleGoogle marked this conversation as resolved.
Show resolved Hide resolved
- run: pip install fog.buildtools
shell: bash
- name: Build plugin
shell: python
run: |
from fog.buildtools import build
build(
src='${{ inputs.src }}',
output='build',
third_party_output='${{ inputs.third-party-target }}',
requirements='${{ inputs.requirements }}',
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
)
)
- name: Zip build
uses: thedoctor0/zip-release@0.7.1
with:
type: 'zip'
filename: 'build.zip'
path: 'build'

might as well zip it here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, might be... firstly I wanted take out any top level decisions (like zip naming) from that action, so it has to be done on plugin side, but plugin name and uuid could be both passed on this action too... idk

- name: Create zip archive
shell: bash
env:
ZIP_NAME: ${{ inputs.output-zip-name }}
run: |
7z a ${ZIP_NAME} ./src/*

- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.output-zip-name }}
path: ${{ inputs.output-zip-name }}