Skip to content

Commit

Permalink
ci: adapt release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kod-kristoff committed Nov 18, 2024
1 parent e19899f commit 07bf238
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release-viklofg-sweocr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "ocr-correction-viklofg-sweocr-v[0-9]+.[0-9]+.[0-9]+"
pull_request:
merge_group:

Expand Down Expand Up @@ -56,15 +56,15 @@ jobs:
# ----- build distribution -----
#----------------------------------------------
- name: Build distribution
run: make build
run: cd ocr-correction-viklofg-sweocr && make build

#----------------------------------------------
# ----- upload artifacts -----
#----------------------------------------------
- uses: actions/upload-artifact@v4
with:
name: pypi_files
path: dist
path: ocr-correction-viklofg-sweocr/dist

test-build:
# This action runs the test suite on the built artifact in the `build` action.
Expand Down Expand Up @@ -98,11 +98,11 @@ jobs:
name: pypi_files
path: dist

- run: rm -r <INSERT PROJECT SRC>
- run: rm -r ocr-correction-viklofg-sweocr/src
- run: pip install typing-extensions
- run: pip install -r tests/requirements-testing.lock
- run: pip install <INSERT PROJECT NAME> --no-index --no-deps --find-links dist --force-reinstall
- run: pytest
- run: pip install -r ocr-correction-viklofg-sweocr/tests/requirements-testing.lock
- run: pip install sparv-sbx-ocr-correction-viklofg-sweocr --no-index --no-deps --find-links dist --force-reinstall
- run: pytest ocr-correction-viklofg-sweocr/tests

# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
release-check:
Expand All @@ -124,7 +124,7 @@ jobs:

needs:
- test-build
if: success() && startsWith(github.ref, 'refs/tags/v')
if: success() && startsWith(github.ref, 'refs/tags/ocr-correction-viklofg-sweocr-v')
runs-on: ubuntu-latest
environment: release
permissions:
Expand Down

0 comments on commit 07bf238

Please sign in to comment.