php-xmpp/.forgejo/workflows/publish-composer.yml
Tristan e3bb4e76da
All checks were successful
Publish Composer Package / publish (push) Successful in 43s
another try
2025-01-09 17:04:00 +01:00

34 lines
No EOL
1.1 KiB
YAML

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: docker # Oder ein selbst gehosteter Runner mit PHP und Composer
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup PHP
uses: https://github.com/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
run: composer archive --format=zip --file=package
- name: Publish to Forgejo Package Registry
run: |
curl --request PUT \
--url "https://git.fucktheforce.de/api/packages/${{ github.repository_owner }}/composer?version=${{ github.event.release.tag_name }}" \
--header "Authorization: Bearer ${{ secrets.WORKFLOW_TOKEN }}" \
--header "Content-Type: application/zip" \
--data-binary "@package.zip"