1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 16:27:13 +03:00

windows-build/archives: Re-order to very early, add directory to tar

* I'd missed copying the `directory` line from zip to tar step.
* There's no reason we can't perform these steps *before* the build, or
  even the python setup, so move them up there.  That has the near side-effect
  of not needing to exclude so much stuff.
This commit is contained in:
Athanasius 2023-01-12 12:14:00 +00:00
parent 7098479902
commit 15ee894142
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -35,6 +35,36 @@ jobs:
with:
submodules: true
- name: Make tar archive
uses: thedoctor0/zip-release@main
with:
# See the 'zip' version for commentary on these values
type: 'tar'
directory: '..'
path: 'EDMarketConnector'
filename: 'EDMarketConnector/EDMarketConnector-release-${{ needs.variables.outputs.sem_ver }}.tar.gz'
# For 'tar' we can only specify filenames, not any directory location
exclusions: 'EDMarketConnector-release-*.* .editorconfig .flake8 .git* .mypy.ini .pre-commit-config.yaml Build-exe-and-msi.py *.manifest coriolis-data img pyproject.toml scripts tests wix'
- name: Make zip archive
uses: thedoctor0/zip-release@main
with:
type: 'zip'
# We want an in-zip prefix of `EDMarketConnector/` for all files, so
# we specify that:
# 1. We work from the parent directory
directory: '..'
# 2. The path we're using is the 'root' directory
path: 'EDMarketConnector'
# 3. The .zip file has to be in the 'root' so that upload-artifact
# will process it. Can't use relative paths.
filename: 'EDMarketConnector/EDMarketConnector-release-${{ needs.variables.outputs.sem_ver }}.zip'
# 4. And all the exclusions need to be prefixed with the 'root'
# directory.
# NB: If this gets too long it can cause zip 'Command Line Error',
# presumably due to a Windows CL length limit.
exclusions: 'EDMarketConnector/EDMarketConnector-release-*.* EDMarketConnector/.editorconfig EDMarketConnector/.flake8 EDMarketConnector/.git* EDMarketConnector/.mypy.ini EDMarketConnector/.pre-commit-config.yaml EDMarketConnector/Build-exe-and-msi.py EDMarketConnector/*.manifest EDMarketConnector/coriolis-data/ EDMarketConnector/img/ EDMarketConnector/pyproject.toml EDMarketConnector/scripts/ EDMarketConnector/tests/ EDMarketConnector/wix/'
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
@ -55,35 +85,6 @@ jobs:
run: |
python Build-exe-and-msi.py
- name: Make zip archive
uses: thedoctor0/zip-release@main
with:
type: 'zip'
# We want an in-zip prefix of `EDMarketConnector/` for all files, so
# we specify that:
# 1. We work from the parent directory
directory: '..'
# 2. The path we're using is the 'root' directory
path: 'EDMarketConnector'
# 3. The .zip file has to be in the 'root' so that upload-artifact
# will process it. Can't use relative paths.
filename: 'EDMarketConnector/EDMarketConnector-release-${{ needs.variables.outputs.sem_ver }}.zip'
# 4. And all the exclusions need to be prefixed with the 'root'
# directory.
# NB: If this gets too long it can cause zip 'Command Line Error',
# presumably due to a Windows CL length limit.
exclusions: 'EDMarketConnector/EDMarketConnector-release-*.* EDMarketConnector/dist.win32 EDMarketConnector/__pycache__/ EDMarketConnector/.editorconfig EDMarketConnector/.flake8 EDMarketConnector/.git* EDMarketConnector/.mypy.ini EDMarketConnector/.pre-commit-config.yaml EDMarketConnector/Build-exe-and-msi.py EDMarketConnector/*.manifest EDMarketConnector/coriolis-data/ EDMarketConnector/img/ EDMarketConnector/out/ EDMarketConnector/out.zip EDMarketConnector/pyproject.toml EDMarketConnector/scripts/ EDMarketConnector/tests/ EDMarketConnector/wix/ EDMarketConnector/WinSparkle.*'
- name: Make tar archive
uses: thedoctor0/zip-release@main
with:
# See the 'zip' version above for commentary on these values
type: 'tar'
path: 'EDMarketConnector'
filename: 'EDMarketConnector/EDMarketConnector-release-${{ needs.variables.outputs.sem_ver }}.tar.gz'
# For 'tar' we can only specify filenames, not any directory location
exclusions: 'EDMarketConnector-release-*.* dist.win32 __pycache__ .editorconfig .flake8 .git* .mypy.ini .pre-commit-config.yaml Build-exe-and-msi.py *.manifest coriolis-data img out out.zip pyproject.toml scripts tests wix WinSparkle.*'
- name: Upload build files
uses: actions/upload-artifact@v3
with: