From 566223f8e6b59528eb574b6e07ae5ecfc358ca9d Mon Sep 17 00:00:00 2001 From: Tristan Date: Thu, 9 Jan 2025 15:52:51 +0100 Subject: [PATCH] adds forgejo workflow --- .forgejo/workflows/publish-composer.yml | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .forgejo/workflows/publish-composer.yml diff --git a/.forgejo/workflows/publish-composer.yml b/.forgejo/workflows/publish-composer.yml new file mode 100644 index 0000000..691c623 --- /dev/null +++ b/.forgejo/workflows/publish-composer.yml @@ -0,0 +1,36 @@ +name: Publish Composer Package + +on: + push: + tags: + - 'v*' # Workflow wird bei Tags gestartet, die mit "v" beginnen (z.B. v1.0.0) + +jobs: + publish: + runs-on: ubuntu-latest # Oder ein selbst gehosteter Runner mit PHP und Composer + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' # Oder deine benötigte PHP-Version + extensions: composer + tools: composer + + - name: Install Dependencies + run: composer install --no-dev --no-interaction --prefer-dist + + - name: Build Package (Optional) + # Hier könnten Build-Schritte für dein Paket stehen, z.B. Kompilierung von Assets + # Beispiel: run: npm run build + + - name: Configure Git for Forgejo Package Registry + run: | + git config --global url."https://${{ github.repository_owner }}:${{ secrets.WORKFLOW_TOKEN }}@git.fucktheforce.de/api/v1/packages/${{ github.repository_owner }}/".insteadOf "https://git.fucktheforce.de/api/v1/packages/${{ github.repository_owner }}/" + git config --global user.email "actions@example.com" + git config --global user.name "Forgejo Actions" + + - name: Publish to Forgejo Package Registry + run: composer publish \ No newline at end of file