Skip to content

Commit 2df34db

Browse files
committed
fix: Test build
1 parent 436c052 commit 2df34db

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,20 @@ permissions:
2525
actions: read
2626

2727
jobs:
28+
read-version:
29+
name: Read C2PA version
30+
runs-on: ubuntu-latest
31+
outputs:
32+
version: ${{ steps.read-version.outputs.version }}
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Read version from file
36+
id: read-version
37+
run: echo "version=$(cat c2pa-version.txt | tr -d '\r\n')" >> $GITHUB_OUTPUT
38+
2839
tests-unix:
2940
name: Unit tests for developer setup (Unix)
41+
needs: read-version
3042
if: |
3143
github.event_name != 'pull_request' ||
3244
github.event.pull_request.author_association == 'COLLABORATOR' ||
@@ -36,7 +48,7 @@ jobs:
3648
3749
runs-on: ${{ matrix.os }}
3850
outputs:
39-
version: "c2pa-v0.55.0"
51+
version: ${{ needs.read-version.outputs.version }}
4052

4153
strategy:
4254
fail-fast: false
@@ -68,11 +80,10 @@ jobs:
6880
- name: Download native artifacts
6981
env:
7082
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71-
C2PA_VERSION: ${{ env.C2PA_VERSION }}
7283
run: |
7384
# Ensure the token is being used
7485
echo "Using GitHub token for authentication"
75-
python3 scripts/download_artifacts.py ${{ env.C2PA_VERSION }}
86+
python3 scripts/download_artifacts.py ${{ needs.read-version.outputs.version }}
7687
7788
- name: Install package in development mode
7889
run: |
@@ -88,6 +99,7 @@ jobs:
8899

89100
tests-windows:
90101
name: Unit tests for developer setup (Windows)
102+
needs: read-version
91103
if: |
92104
github.event_name != 'pull_request' ||
93105
github.event.pull_request.author_association == 'COLLABORATOR' ||
@@ -97,7 +109,7 @@ jobs:
97109
98110
runs-on: windows-latest
99111
outputs:
100-
version: "c2pa-v0.55.0"
112+
version: ${{ needs.read-version.outputs.version }}
101113

102114
steps:
103115
- name: Checkout repository
@@ -136,11 +148,10 @@ jobs:
136148
- name: Download native artifacts
137149
env:
138150
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
139-
C2PA_VERSION: ${{ env.C2PA_VERSION }}
140151
run: |
141152
# Ensure the token is being used
142153
echo "Using GitHub token for authentication"
143-
python scripts\download_artifacts.py ${{ env.C2PA_VERSION }}
154+
python scripts\download_artifacts.py ${{ needs.read-version.outputs.version }}
144155
145156
- name: Install package in development mode
146157
run: |
@@ -244,7 +255,7 @@ jobs:
244255
architecture: ${{ matrix.target }}
245256
artifact-name: wheels-windows-${{ matrix.target }}
246257
runs-on: windows-latest
247-
c2pa-version: ${{ env.C2PA_VERSION }}
258+
c2pa-version: ${{ needs.read-version.outputs.version }}
248259
secrets:
249260
github-token: ${{ secrets.GITHUB_TOKEN }}
250261
strategy:

0 commit comments

Comments
 (0)