Skip to content

Commit a06c0d3

Browse files
authored
Merge pull request #167 from LeoHsiao1/dev
Dev
2 parents 7f4fcb6 + fd5933d commit a06c0d3

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
exiv2_version:
1212
default: 0.28.5
1313

14+
env:
15+
# When workflow is automatically triggered by a git push event, it does not set the default value of exiv2_version.
16+
# So I have to set the default value again.
17+
exiv2_version: ${{ inputs.exiv2_version || '0.28.5' }}
18+
1419
jobs:
1520
on_linux:
1621
strategy:
@@ -23,9 +28,9 @@ jobs:
2328
runs-on: ${{ matrix.runner.os }}
2429
env:
2530
PLATFORM_NAME: ${{matrix.runner.exiv2_platform_name}}
26-
EXIV2_URL: https://github.com/Exiv2/exiv2/releases/download/v${{inputs.exiv2_version}}
27-
EXIV2_VERSION: ${{inputs.exiv2_version}}
28-
EXIV2_BUILD_NAME: exiv2-${{inputs.exiv2_version}}-${{matrix.runner.exiv2_platform_name}}
31+
EXIV2_URL: https://github.com/Exiv2/exiv2/releases/download/v${{env.exiv2_version}}
32+
EXIV2_VERSION: ${{env.exiv2_version}}
33+
EXIV2_BUILD_NAME: exiv2-${{env.exiv2_version}}-${{matrix.runner.exiv2_platform_name}}
2934
EXIV2_BUILD_EXT: .tar.gz
3035
PYTHON_VERSION: ${{matrix.python_version}}
3136
steps:
@@ -90,9 +95,9 @@ jobs:
9095
runs-on: ${{ matrix.runner.os }}
9196
env:
9297
PLATFORM_NAME: ${{matrix.runner.exiv2_platform_name}}
93-
EXIV2_URL: https://github.com/Exiv2/exiv2/releases/download/v${{inputs.exiv2_version}}
94-
EXIV2_VERSION: ${{inputs.exiv2_version}}
95-
EXIV2_BUILD_NAME: exiv2-${{inputs.exiv2_version}}-${{matrix.runner.exiv2_platform_name}}
98+
EXIV2_URL: https://github.com/Exiv2/exiv2/releases/download/v${{env.exiv2_version}}
99+
EXIV2_VERSION: ${{env.exiv2_version}}
100+
EXIV2_BUILD_NAME: exiv2-${{env.exiv2_version}}-${{matrix.runner.exiv2_platform_name}}
96101
EXIV2_BUILD_EXT: .tar.gz
97102
PYTHON_VERSION: ${{matrix.python_version}}
98103
steps:
@@ -157,9 +162,9 @@ jobs:
157162
runs-on: ${{ matrix.runner.os }}
158163
env:
159164
PLATFORM_NAME: ${{matrix.runner.exiv2_platform_name}}
160-
EXIV2_URL: https://github.com/Exiv2/exiv2/releases/download/v${{inputs.exiv2_version}}
161-
EXIV2_VERSION: ${{inputs.exiv2_version}}
162-
EXIV2_BUILD_NAME: exiv2-${{inputs.exiv2_version}}-${{matrix.runner.exiv2_platform_name}}
165+
EXIV2_URL: https://github.com/Exiv2/exiv2/releases/download/v${{env.exiv2_version}}
166+
EXIV2_VERSION: ${{env.exiv2_version}}
167+
EXIV2_BUILD_NAME: exiv2-${{env.exiv2_version}}-${{matrix.runner.exiv2_platform_name}}
163168
EXIV2_BUILD_EXT: .zip
164169
PYTHON_VERSION: ${{matrix.python_version}}
165170
steps:

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ on:
66
workflow_dispatch:
77
inputs:
88
last_build_id:
9-
description: Input the run id of workflows/build.yml, to download artifacts from it.
9+
# description: Input the run id of workflows/build.yml, to download artifacts from it.
1010
upload_to_github:
1111
default: false
12+
type: boolean
1213
# upload_to_pypi:
1314
# default: false
15+
# type: boolean
1416

1517
jobs:
1618
release:
@@ -92,7 +94,7 @@ jobs:
9294

9395
- name: Upload wheels to GitHub
9496
uses: softprops/action-gh-release@v2
95-
if: inputs.upload_to_github == 'true'
97+
if: ${{ inputs.upload_to_github }}
9698
with:
9799
name: A draft for release
98100
draft: true
@@ -101,7 +103,7 @@ jobs:
101103
dist/*
102104
103105
# - name: Upload wheels to PyPI
104-
# if: inputs.upload_to_pypi == 'true'
106+
# if: ${{ inputs.upload_to_pypi }}
105107
# run: |
106108
# python -m twine upload -u __token__ dist/*
107109
# # Maybe the token should not be used, according to https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#configuring-trusted-publishing
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Test pyexiv2 wheel packages uploaded to pypi.org .
22

3-
name: Test package
3+
name: Test wheels
44

55
on:
66
# release:

0 commit comments

Comments
 (0)