Gui #39
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- 'main' | |
env: | |
SOURCE_DIR: ${{ github.workspace }} | |
QT_VERSION: 5.9.9 | |
ARTIFACT: build-assets | |
name: Create Release | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
working-directory: "${{ env.SOURCE_DIR }}/src/gui" | |
run: | | |
pip install -r requirements.txt | |
- name: Build with PyInstaller | |
working-directory: "${{ env.SOURCE_DIR }}/src/gui" | |
run: | | |
pyinstaller --onefile --noconsole app.py | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-app | |
path: "${{ env.SOURCE_DIR }}/src/gui/dist/app.exe" | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
submodules: false | |
lfs: true | |
- id: download-nifskope-converter | |
uses: robinraju/release-downloader@v1.8 | |
with: | |
repository: "terry-haire/nifskope" | |
latest: true | |
out-file-path: "${{ env.SOURCE_DIR }}/build/nifskope_converter/release/" | |
extract: true | |
- id: download-xedit-converter | |
uses: robinraju/release-downloader@v1.8 | |
with: | |
repository: "terry-haire/TES5Edit" | |
latest: true | |
out-file-path: "${{ env.SOURCE_DIR }}/build/xedit_converter/" | |
extract: true | |
- name: Zip Folder | |
shell: bash | |
working-directory: ${{ env.SOURCE_DIR }} | |
run: | | |
rm "${{ fromJson(steps.download-nifskope-converter.outputs.downloaded_files)[0] }}" | |
rm "${{ fromJson(steps.download-xedit-converter.outputs.downloaded_files)[0] }}" | |
mkdir ${{ runner.temp }}/assets | |
zip -r ${{ runner.temp }}/assets/${{ env.ARTIFACT }}.zip \ | |
./build/nifskope_converter/release/ \ | |
./build/xedit_converter/ \ | |
./src/models-and-animations/elric/ \ | |
./src/convert.ps1 \ | |
./src/data/ \ | |
./src/plugins/xEdit/ \ | |
./convert.bat \ | |
./README.md \ | |
./images/ \ | |
./bin/ | |
- name: Save build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.ARTIFACT }} | |
path: | | |
${{ runner.temp }}/assets/${{ env.ARTIFACT }}.zip | |
# - name: Conventional Changelog Action | |
# uses: TriPSs/conventional-changelog-action@v3 | |
# with: | |
# github-token: ${{ secrets.github_token }} | |
- name: Create Release | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
id: create-release | |
uses: actions/create-release@v1 | |
# if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.github_token }} | |
with: | |
# tag_name: ${{ steps.changelog.outputs.tag }} | |
# release_name: ${{ steps.changelog.outputs.tag }} | |
# body: ${{ steps.changelog.outputs.clean_changelog }} | |
tag_name: v${{ github.run_number }} | |
release_name: v${{ github.run_number }} | |
draft: false | |
prerelease: true | |
- name: Upload Release Asset | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: ${{ runner.temp }}/assets/${{ env.ARTIFACT }}.zip | |
asset_name: fnv-to-fo4-v${{ github.run_number }}.zip | |
asset_content_type: application/zip |