php-xmpp/.forgejo/workflows/publish-composer.yml
Tristan 6eca2c8e0a
Some checks failed
Publish Composer Package / publish (push) Failing after 43s
output publishing url
2025-01-09 17:11:53 +01:00

35 lines
No EOL
1.3 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: |
echo "Publishing to https://git.fucktheforce.de/api/packages/${{ github.repository_owner }}/composer?version=${{ github.event.release.tag_name }}"
curl --request PUT --fail --silent \
--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"