Bump requests from 2.31.0 to 2.32.2 (#147) #145
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
name: Build | |
on: | |
push: | |
workflow_dispatch: | |
concurrency: | |
group: build-${{ inputs.git-ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: | |
- macos | |
- ubuntu | |
- windows | |
runs-on: ${{ matrix.os }}-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
cache: pip | |
- name: Install Dependencies | |
run: pip install -r requirements.txt | |
- name: Inject Properties | |
shell: bash | |
run: | | |
version="${{ github.ref_name }}@${GITHUB_SHA:0:7}" | |
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then | |
version="${{ github.ref_name }}" | |
fi | |
properties_file="eon_timer/properties.json" | |
cat <<EOF > "${properties_file}" | |
{ | |
"version": "${version}", | |
"build": "${{ github.run_number }}", | |
"commit": "${GITHUB_SHA:0:7}" | |
} | |
EOF | |
- name: Unit Tests | |
run: python -m unittest discover -v -s test -p "*_test.py" | |
- name: Build Bundled Themes | |
run: python theme.py build --bundled | |
- name: Build | |
run: pyinstaller EonTimer.spec | |
- name: Get Artifact Name | |
id: artifact | |
shell: bash | |
run: | | |
if [[ "${{ matrix.os }}" == "macos" ]]; then | |
hdiutil create -format UDZO -srcfolder dist/EonTimer.app dist/EonTimer.dmg | |
echo "artifact_name=EonTimer.dmg" >> "$GITHUB_OUTPUT" | |
elif [[ "${{ matrix.os }}" == "windows" ]]; then | |
echo "artifact_name=EonTimer.exe" >> "$GITHUB_OUTPUT" | |
elif [[ "${{ matrix.os }}" == "ubuntu" ]]; then | |
echo "artifact_name=EonTimer" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Upload Workflow Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: EonTimer-${{ matrix.os }} | |
path: dist/${{ steps.artifact.outputs.artifact_name }} | |
- name: Create Release Artifact | |
if: startsWith(github.ref, 'refs/tags/') | |
id: release-artifact | |
shell: bash | |
run: | | |
release_artifact="EonTimer-${{ matrix.os }}.zip" | |
echo "artifact_name=${release_artifact}" >> "$GITHUB_OUTPUT" | |
python3 bin/create-release-artifact.py -d dist -o EonTimer-${{ matrix.os }}.zip ${{ steps.artifact.outputs.artifact_name }} | |
- name: Upload Release Artifact | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: dist/${{ steps.release-artifact.outputs.artifact_name }} |