Skip to content

Commit

Permalink
Add a PowerShell environment variable as a convenience accessor for t…
Browse files Browse the repository at this point in the history
…he version number, and add an explanatory comment about the .ini file piece, and reactivate the ruff check

Signed-off-by: Jim Hawkins <sjjhsjjhsjjh@gmail.com>
  • Loading branch information
sjjhsjjh committed Apr 16, 2024
1 parent eebb6c7 commit 3f70a01
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/windows-build-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ on:
permissions:
contents: write

# In this workflow the release version number is read from a .ini file. That is
# implemented by having one job read the file and print the key-value pair to
# the its output. Another job then uses the output value.
#
# - Output is generated by the `check` job, in the step Get version number.
# - The value is consumed in the `build` job.
#
# And see the reference documentation here.
# https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs


jobs:

check:
Expand All @@ -31,14 +42,17 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install ruff
# - name: Analysing the code with ruff
# run: |
# ruff check .
- name: Analysing the code with ruff
run: |
ruff check .
# The build job runs on a Windows machine and performs various build steps.
build:
runs-on: windows-latest
needs: check
env:
# Convenience variable with a shorter name.
VersionNumber: ${{needs.check.outputs.VersionNumber}}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
Expand All @@ -60,22 +74,20 @@ jobs:
# pyinstaller --distpath dist-portable build-portable.spec
- name: Demo version number
run: |
New-Item delme-${{needs.check.outputs.VersionNumber}}.txt -type file
New-Item delme-$Env:VersionNumber".txt" -type file
# - name: Zip Portable
# shell: pwsh
# run: |
# Copy-Item -Path assets -Destination dist-portable\ -Recurse
# Copy-Item -Path configs -Destination dist-portable\ -Recurse
# Compress-Archive -Path dist-portable -DestinationPath FaceCommander-Portable-${{github.ref_name}}.zip

# Compress-Archive -Path dist-portable -DestinationPath \
# FaceCommander-Portable-$Env:VersionNumber".zip"
# - name: release
# uses: softprops/action-gh-release@v1
# with:
# files: |
# Output/FaceCommander-Installer-${{github.ref_name}}.exe
# FaceCommander-Portable-${{github.ref_name}}.zip
# tag_name: ${{github.ref_name}}
# Output/FaceCommander-Installer-${{needs.check.outputs.VersionNumber}}.exe
# FaceCommander-Portable-${{needs.check.outputs.VersionNumber}}.zip
# tag_name: ${{needs.check.outputs.VersionNumber}}
# draft: false
# prerelease: false

0 comments on commit 3f70a01

Please sign in to comment.