-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows installer, reorganize workflows
- Loading branch information
Showing
10 changed files
with
127 additions
and
40 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
on: | ||
workflow_call: | ||
|
||
name: Workflow - Build exe | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
name: Build Windows exe | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout | ||
- uses: actions/setup-python@v4 | ||
name: Setup Python | ||
with: | ||
python-version: ${{ vars.PYTHON_VERSION}} | ||
- name: Install deps | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[build] | ||
- name: Build | ||
run: pyinstaller dyn2py.spec | ||
- uses: actions/upload-artifact@v3 | ||
name: Upload artifact | ||
with: | ||
name: dyn2py.exe | ||
path: dist/dyn2py.exe |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
on: | ||
workflow_call: | ||
|
||
name: Workflow - Build installer | ||
|
||
jobs: | ||
build-installer: | ||
runs-on: windows-latest | ||
name: Build Windows installer | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout | ||
- name: Install Inno Setup | ||
run: | | ||
Invoke-WebRequest -Uri https://jrsoftware.org/download.php/is.exe -OutFile is.exe | ||
.\is.exe /verysilent | ||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dyn2py.exe | ||
path: dist/dyn2py.exe | ||
- name: Update version number | ||
run: | | ||
$regex = Select-String -Path pyproject.toml -Pattern '^version = "((?:\d\.){2}\d)"$' | ||
$version = $regex.Matches.Groups[1].Value | ||
(Get-Content dyn2py-installer.iss).Replace("x.x.x",$version) | Set-Content dyn2py-installer.iss | ||
- name: Build installer | ||
run: | | ||
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" -Qp $(Join-Path $PWD.Path dyn2py-installer.iss) | ||
- uses: actions/upload-artifact@v3 | ||
name: Upload artifact | ||
with: | ||
name: dyn2py-installer.exe | ||
path: Output/dyn2py-installer.exe |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,39 +10,29 @@ permissions: | |
|
||
jobs: | ||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
python-version: ${{ vars.PYTHON_VERSION}} | ||
python-version: ${{ vars.PYTHON_VERSION }} | ||
os: ${{ matrix.os }} | ||
|
||
build: | ||
runs-on: windows-latest | ||
build-exe: | ||
name: Build Windows exe | ||
needs: test | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout | ||
- uses: actions/setup-python@v4 | ||
name: Setup Python | ||
with: | ||
python-version: ${{ vars.PYTHON_VERSION}} | ||
- name: Install deps | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[build] | ||
- name: Build | ||
run: pyinstaller dyn2py.spec | ||
- uses: actions/upload-artifact@v3 | ||
name: Upload artifact | ||
with: | ||
name: dyn2py.exe | ||
path: dist/dyn2py.exe | ||
uses: ./.github/workflows/build-exe.yml | ||
|
||
build-installer: | ||
name: Build Windows installer | ||
needs: build-exe | ||
uses: ./.github/workflows/build-installer.yml | ||
|
||
release: | ||
name: Create Github release | ||
runs-on: ubuntu-latest | ||
needs: build | ||
needs: build-installer | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout | ||
|
@@ -51,17 +41,24 @@ jobs: | |
uses: metcalfc/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Download artifact | ||
- name: Download exe | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dyn2py.exe | ||
- name: Download installer | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dyn2py-installer.exe | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: dyn2py.exe | ||
body: ${{ steps.modified.outputs.log }} | ||
files: | | ||
dyn2py.exe | ||
dyn2py-installer.exe | ||
body: ${{ steps.changelog.outputs.changelog }} | ||
|
||
pip: | ||
name: Publish to PyPI | ||
runs-on: ubuntu-latest | ||
needs: release | ||
steps: | ||
|
@@ -70,7 +67,7 @@ jobs: | |
- uses: actions/setup-python@v4 | ||
name: Setup Python | ||
with: | ||
python-version: ${{ vars.PYTHON_VERSION}} | ||
python-version: ${{ vars.PYTHON_VERSION }} | ||
- name: Install deps | ||
run: | | ||
python -m pip install --upgrade pip | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ permissions: | |
|
||
jobs: | ||
tests: | ||
name: Unit tests | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Build Windows exe and installer | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: ["main"] | ||
# push: | ||
|
||
jobs: | ||
build-exe: | ||
uses: ./.github/workflows/build-exe.yml | ||
name: Build Windows exe | ||
|
||
build-installer: | ||
name: Build Windows installer | ||
needs: build-exe | ||
uses: ./.github/workflows/build-installer.yml |
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
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
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