Skip to content

Commit

Permalink
PR cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Piagrammist committed Jan 15, 2025
1 parent 3d87836 commit c7ea5fa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 69 deletions.
7 changes: 1 addition & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
interval: "daily"
79 changes: 16 additions & 63 deletions .github/workflows/phar.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
name: Create and Release PHAR

on:
workflow_dispatch:
inputs:
version:
description: "Release version (e.g., 1.0.0)"
required: true
tag:
description: "Git tag (e.g., v1.0.0)"
required: true
description:
description: "Release description"
required: false
push:
tags:
- v*

permissions:
contents: write

jobs:
generate-phar:
name: Generate PHAR and Upload Artifact
create-release:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3 # Ensure that the repository is properly checked out
- uses: actions/checkout@v4

- name: Set up PHP
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
Expand All @@ -31,57 +24,17 @@ jobs:
run: |
echo "phar.readonly=0" | sudo tee -a /etc/php/8.3/cli/conf.d/99-disable-phar.ini
- name: Verify PHP Configuration
run: php -i | grep "phar.readonly"

- name: Install Dependencies
run: composer install --no-dev
run: composer install --no-dev --no-progress

- name: Run makephar.php
- name: Execute the PHAR Maker Script
run: php scripts/makephar.php
env:
OUTPUT_FILE: artifact.phar

- name: List Files for Debugging
run: ls -l

- name: Rename PHAR File
run: mv scripts/easy-ini.phar easy-ini-${{ github.event.inputs.version }}.phar

- name: Upload PHAR Artifact
uses: actions/upload-artifact@v3
with:
name: easy-ini-${{ github.event.inputs.version }}.phar
path: ./easy-ini-${{ github.event.inputs.version }}.phar

create-release:
name: Create GitHub Release
needs: generate-phar
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout Code Again
uses: actions/checkout@v3 # Make sure it's checked out again in the release job

- name: Download PHAR Artifact
uses: actions/download-artifact@v3
with:
name: easy-ini-${{ github.event.inputs.version }}.phar

- name: Debug Inputs
run: |
echo "Version: ${{ github.event.inputs.version }}"
echo "Tag: ${{ github.event.inputs.tag }}"
echo "Description: ${{ github.event.inputs.description }}"

- name: Create Release
id: create_release
- name: Release
run: |
VERSION=${{ github.event.inputs.version }}
echo "Creating release for version: $VERSION"
gh release create "$VERSION" easy-ini-${{ github.event.inputs.version }}.phar --title "Release $VERSION" --notes "${{ github.event.inputs.description || 'No description provided.' }}"
TAG=${{ github.ref_name }}
echo "Creating release for $TAG"
gh release create "$TAG" scripts/easy-ini.phar --title "$TAG"
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}

0 comments on commit c7ea5fa

Please sign in to comment.