adds forgejo workflow
Some checks failed
Publish Composer Package / publish (push) Has been cancelled
Some checks failed
Publish Composer Package / publish (push) Has been cancelled
This commit is contained in:
parent
9dad5a4aa7
commit
566223f8e6
1 changed files with 36 additions and 0 deletions
36
.forgejo/workflows/publish-composer.yml
Normal file
36
.forgejo/workflows/publish-composer.yml
Normal file
|
@ -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
|
Loading…
Reference in a new issue