Skip to content

Commit

Permalink
Use patch to update parsec version in different workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
FirelightFlagboy committed Mar 5, 2024
1 parent 0d0756e commit c1e6080
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/_parse_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,23 @@ jobs:
"${{ inputs.version || '--uniq-dev' }}"
| tee -a "$GITHUB_OUTPUT"
timeout-minutes: 2

- name: Set version for patching
run: >-
PYTHONPATH=. python3
misc/version_updater.py
--tool parsec
--version ${{ steps.version.outputs.full }}
timeout-minutes: 2

- name: Generate git patch
run: git diff | tee -a version.patch
timeout-minutes: 2

- name: Upload patch
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # pin v4.3.1
with:
name: version.patch
path: version.patch
if-no-files-found: error
retention-days: 1
13 changes: 8 additions & 5 deletions .github/workflows/package-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ jobs:
node-version: ${{ env.node-version }}
timeout-minutes: 2

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # pin v5.0.0
- name: Download version.patch artifact
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # pin v4.1.4
with:
python-version-file: server/pyproject.toml
timeout-minutes: 2
name: version.patch
path: ${{ runner.temp }}/version.patch

- name: Set parsec version ${{ needs.version.outputs.full }}
run: python3 misc/version_updater.py --tool parsec --version ${{ needs.version.outputs.full }}
- name: Apply version.patch
run: |
ls ${{ runner.temp }}/verion.patch
git apply ${{ runner.temp }}/version.patch
- name: Install dependencies
run: npm clean-install
Expand Down

0 comments on commit c1e6080

Please sign in to comment.