Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make release workflow reusable #9

Open
mikegerber opened this issue Aug 2, 2023 · 2 comments
Open

Make release workflow reusable #9

mikegerber opened this issue Aug 2, 2023 · 2 comments
Assignees

Comments

@mikegerber
Copy link
Member

The workflow in release.yml should be reusable in other projects (e.g. dinglehopper)

@mikegerber mikegerber self-assigned this Aug 2, 2023
@mikegerber
Copy link
Member Author

Blocked by:

I couldn't even make it work with an in-repo reusable workflow (secrets: inherit didn't have the effect, but I made have overseen sth else)

@mikegerber mikegerber mentioned this issue Aug 2, 2023
8 tasks
@mikegerber
Copy link
Member Author

mikegerber commented Aug 11, 2023

Here the same for dinglehopper:

grafik

There's small differences that I should resolve:

❯ diff -u {setuptools_ocrd,dinglehopper}/.github/workflows/release.yml
--- setuptools_ocrd/.github/workflows/release.yml       2023-08-02 19:07:47.907186700 +0200
+++ dinglehopper/.github/workflows/release.yml  2023-08-04 19:45:35.654440100 +0200
@@ -6,20 +6,31 @@
       - "v*.*.*"

 env:
-  PYPI_URL: https://pypi.org/p/setuptools-ocrd
+  PYPI_URL: https://pypi.org/p/dinglehopper

 jobs:
+  test:
+    uses: ./.github/workflows/test.yml
+
   build:
+    needs: test
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
         uses: actions/checkout@v3
+      - name: Upgrade pip
+        run: python3 -m pip install --upgrade pip
+      - name: Install setuptools
+        run: |
+          python3 -m pip install --upgrade setuptools
+          # For OCR-D tools, we need setuptools-ocrd to get the version
+          if [ -e ocrd-tool.json ]; then
+            python3 -m pip install setuptools-ocrd
+          fi
       - name: Check git tag vs package version
-        run: python3 -m pip install --upgrade setuptools && .github/workflows/release-check-version-tag
+        run: .github/workflows/release-check-version-tag
       - name: Build package
         run: python3 -m pip install --upgrade build && python3 -m build
-      - name: Test
-        run: python3 -m pip install -r requirements-dev.txt && pytest
       - name: Upload dist
         uses: actions/upload-artifact@v3
         with:

@kba If you're interested, I'd also like your opinion on this (not on the difference but on the release workflow ;))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant