-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: Synchronize with ergebnis/php-package-template
- Loading branch information
1 parent
4d7e06c
commit b8b49e8
Showing
18 changed files
with
245 additions
and
1,100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,124 +15,12 @@ jobs: | |
|
||
timeout-minutes: 5 | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
dependencies: | ||
- "locked" | ||
|
||
env: | ||
COMPOSER_NORMALIZE_PHAR: ".build/phar/composer-normalize.phar" | ||
COMPOSER_NORMALIZE_PHAR_SIGNATURE: ".build/phar/composer-normalize.phar.asc" | ||
COMPOSER_VERSION: "2.7.7" | ||
GPG_KEYS: ".build/phar/keys.asc" | ||
GPG_KEYS_ENCRYPTED: "phar/keys.asc.gpg" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/[email protected]" | ||
|
||
- name: "Set up PHP" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: "phive" | ||
|
||
- name: "Determine composer cache directory" | ||
uses: "ergebnis/.github/actions/composer/[email protected]" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/[email protected]" | ||
with: | ||
path: "${{ env.COMPOSER_CACHE_DIR }}" | ||
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
|
||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "ergebnis/.github/actions/composer/[email protected]" | ||
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Require composer/composer" | ||
run: "composer require composer/composer:${{ env.COMPOSER_VERSION }} --ansi --no-interaction --no-progress" | ||
|
||
- name: "Install dependencies with phive" | ||
uses: "ergebnis/.github/actions/phive/[email protected]" | ||
with: | ||
trust-gpg-keys: "0xC00543248C87FB13,0x033E5F8D801A2F8D,0x2DF45277AEF09A2F" | ||
|
||
- name: "Validate configuration for humbug/box" | ||
run: ".phive/box validate box.json --ansi" | ||
|
||
- name: "Compile composer-normalize.phar with humbug/box" | ||
run: ".phive/box compile --ansi --config=box.json" | ||
|
||
- name: "Show info about composer-normalize.phar with humbug/box" | ||
run: ".phive/box info ${{ env.COMPOSER_NORMALIZE_PHAR }} --ansi" | ||
|
||
- name: "Run composer-normalize.phar" | ||
run: "${{ env.COMPOSER_NORMALIZE_PHAR }}" | ||
|
||
- name: "Show gpg version" | ||
run: "gpg --version" | ||
|
||
- name: "Decrypt keys.asc.gpg with gpg" | ||
run: "gpg --batch --output ${{ env.GPG_KEYS }} --passphrase \"${{ secrets.GPG_DECRYPT_PASSPHRASE }}\" --yes --decrypt ${{ env.GPG_KEYS_ENCRYPTED }}" | ||
|
||
- name: "Import keys from keys.asc with gpg" | ||
run: "gpg --batch --import ${{ env.GPG_KEYS }}" | ||
|
||
- name: "Sign composer-normalize.phar with gpg" | ||
run: "gpg --armor --local-user \"${{ secrets.GPG_LOCAL_USER }}\" --output ${{ env.COMPOSER_NORMALIZE_PHAR_SIGNATURE }} --passphrase \"${{ secrets.GPG_KEY_PASSPHRASE }}\" --pinentry-mode loopback --yes --detach-sig ${{ env.COMPOSER_NORMALIZE_PHAR }}" | ||
|
||
- name: "Remove decrypted keys.asc" | ||
run: "rm ${{ env.GPG_KEYS }}" | ||
|
||
- name: "Determine tag" | ||
run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV" | ||
|
||
- name: "Create release" | ||
uses: "ergebnis/.github/actions/github/release/[email protected]" | ||
with: | ||
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" | ||
|
||
- name: "Upload release assets" | ||
uses: "actions/[email protected]" | ||
with: | ||
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" | ||
script: | | ||
const fs = require("fs"); | ||
const files = [ | ||
{ | ||
name: "composer-normalize.phar", | ||
path: process.env.COMPOSER_NORMALIZE_PHAR, | ||
}, | ||
{ | ||
name: "composer-normalize.phar.asc", | ||
path: process.env.COMPOSER_NORMALIZE_PHAR_SIGNATURE, | ||
}, | ||
]; | ||
for (const file of files) { | ||
try { | ||
await github.rest.repos.uploadReleaseAsset({ | ||
data: fs.readFileSync(file.path), | ||
name: file.name, | ||
origin: process.env.RELEASE_UPLOAD_URL, | ||
owner: context.repo.owner, | ||
release_id: process.env.RELEASE_ID, | ||
repo: context.repo.repo, | ||
}); | ||
} catch (error) { | ||
core.setFailed(error.message); | ||
} | ||
} | ||
- name: "Post to twitter.com about release" | ||
uses: "Eomm/[email protected]" | ||
env: | ||
|
@@ -142,6 +30,6 @@ jobs: | |
TWITTER_CONSUMER_API_SECRET: "${{ secrets.ERGEBNIS_TWITTER_CONSUMER_API_KEY_SECRET }}" | ||
with: | ||
tweet-message: | | ||
🎵 Just released: ${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}:${{ env.RELEASE_TAG }}. | ||
📒 Just released: ${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}:${{ env.RELEASE_TAG }}. | ||
${{ env.RELEASE_HTML_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
- "8.1" | ||
|
||
dependencies: | ||
- "locked" | ||
|
@@ -32,7 +32,7 @@ jobs: | |
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter" | ||
extensions: "none, bcmath, ctype, curl, dom, intl, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Set up problem matchers for PHP" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phive xmlns="https://phar.io/phive"> | ||
<phar name="composer-normalize" version="^2.42.0" installed="2.42.0" location="./.phive/composer-normalize" copy="false"/> | ||
<phar name="composer-normalize" version="^2.44.0" installed="2.44.0" location="./.phive/composer-normalize" copy="false"/> | ||
<phar name="composer-require-checker" version="^3.8.0" installed="3.8.0" location="./.phive/composer-require-checker" copy="false"/> | ||
<phar name="humbug/box" version="^3.16.0" installed="3.16.0" location="./.phive/box" copy="false"/> | ||
</phive> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.