Release/5.9.3 Update Changelog and Version #119
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
# vim: tabstop=2 shiftwidth=2 | |
name: Build EDMC for Windows | |
on: | |
push: | |
tags: | |
- "Release/*" | |
workflow_dispatch: | |
jobs: | |
variables: | |
outputs: | |
sem_ver: ${{ steps.var.outputs.sem_ver }} | |
archive_exclusions: ${{ steps.var.outputs.archive_exclusions }} | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Setting global variables | |
uses: actions/github-script@v6 | |
id: var | |
with: | |
script: | | |
core.setOutput('sem_ver', '${{ github.ref_name }}'.replaceAll('Release\/', '')) | |
linux_build: | |
needs: [variables] | |
name: Linux environment build steps | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Make tar archive | |
run: | | |
# For 'tar' we can only specify filename/glob exclusions, not any | |
# directory location | |
tar -c -v -z \ | |
-f ../EDMarketConnector-release-${{ needs.variables.outputs.sem_ver }}.tar.gz \ | |
-C .. \ | |
--exclude=EDMarketConnector-release-*.* \ | |
--exclude=.editorconfig \ | |
--exclude=.flake8 \ | |
--exclude=.git* \ | |
--exclude=.mypy.ini \ | |
--exclude=.pre-commit-config.yaml \ | |
--exclude=build.py \ | |
--exclude=*.manifest \ | |
--exclude=coriolis-data \ | |
--exclude=img \ | |
--exclude=pyproject.toml \ | |
--exclude=scripts \ | |
--exclude=tests \ | |
EDMarketConnector | |
mv ../EDMarketConnector-release-${{ needs.variables.outputs.sem_ver }}.tar.gz . | |
- name: Upload build files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Built files | |
path: | | |
EDMarketConnector-release-*.tar.gz | |
windows_build: | |
needs: [variables] | |
name: Build EDMC | |
runs-on: windows-2019 | |
defaults: | |
run: | |
shell: powershell | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- 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.py EDMarketConnector/*.manifest EDMarketConnector/coriolis-data/ EDMarketConnector/img/ EDMarketConnector/pyproject.toml EDMarketConnector/scripts/ EDMarketConnector/tests/' | |
- uses: actions/setup-python@v4 | |
with: | |
python-version-file: '.python-version' | |
architecture: "x86" | |
- name: Install python tools | |
run: | | |
pip install wheel | |
pip install -r requirements-dev.txt | |
- name: Download winsparkle | |
run: | | |
Invoke-Webrequest -UseBasicParsing https://github.com/vslavik/winsparkle/releases/download/v0.8.0/WinSparkle-0.8.0.zip -OutFile out.zip | |
Expand-Archive out.zip | |
Move-Item 'out\WinSparkle-0.8.0\Release\*' '.\' | |
- name: Build EDMC | |
run: | | |
python build.py | |
- name: InnoSetup | |
uses: nadeemjazmawe/[email protected] | |
with: | |
filepath: './EDMC_Installer_Config.iss' | |
- name: Upload build files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Built files | |
path: | | |
EDMarketConnector_Installer_*.exe | |
EDMarketConnector-release-*.zip | |
release: | |
name: Release new version | |
runs-on: ubuntu-latest | |
needs: [ windows_build, linux_build ] | |
if: "${{ github.event_name != 'workflow_dispatch' }}" | |
steps: | |
- name: Download binary | |
uses: actions/download-artifact@v3 | |
with: | |
name: Built files | |
path: ./ | |
- name: Hash files | |
run: sha256sum EDMarketConnector_Installer_*.exe EDMarketConnector-release-*.{zip,tar.gz} > ./hashes.sum | |
- name: Create Draft Release | |
uses: "softprops/action-gh-release@v1" | |
with: | |
token: "${{secrets.GITHUB_TOKEN}}" | |
draft: true | |
prerelease: true | |
discussion_category_name: "Announcement" | |
files: | | |
./EDMarketConnector_Installer_*.exe | |
./EDMarketConnector-release-*.zip | |
./EDMarketConnector-release-*.tar.gz | |
./hashes.sum |