-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
166 additions
and
87 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,60 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Build | ||
id: build | ||
uses: gocom/action-textpattern-package-plugin@master | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Compressed Plugin Installer | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ github.workspace }}/${{ steps.build.outputs.compressed }} | ||
asset_name: ${{ steps.build.outputs.name }}_v${{ steps.build.outputs.version }}_zip.txt | ||
asset_content_type: text/plain | ||
|
||
- name: Upload Uncompressed Plugin Installer | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ github.workspace }}/${{ steps.build.outputs.uncompressed }} | ||
asset_name: ${{ steps.build.outputs.name }}_v${{ steps.build.outputs.version }}.txt | ||
asset_content_type: text/plain | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
id: build | ||
uses: gocom/action-textpattern-package-plugin@master | ||
|
||
- name: Changelog | ||
id: changelog | ||
run: | | ||
contents="$(sed -e '1,/h2. Changelog/d' README.textile | sed -e '1,/h3./d' -e '/h3./,$d')" | ||
contents="${contents//'%'/'%25'}" | ||
contents="${contents//$'\n'/'%0A'}" | ||
contents="${contents//$'\r'/'%0D'}" | ||
echo "::set-output name=contents::$contents" | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
body: ${{ steps.changelog.outputs.contents }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Compressed Plugin Installer | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ github.workspace }}/${{ steps.build.outputs.compressed }} | ||
asset_name: ${{ steps.build.outputs.name }}_v${{ steps.build.outputs.version }}_zip.txt | ||
asset_content_type: text/plain | ||
|
||
- name: Upload Uncompressed Plugin Installer | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ github.workspace }}/${{ steps.build.outputs.uncompressed }} | ||
asset_name: ${{ steps.build.outputs.name }}_v${{ steps.build.outputs.version }}.txt | ||
asset_content_type: text/plain |
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 |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
!.editorconfig | ||
!.github | ||
!.gitignore | ||
/composer.lock | ||
/vendor | ||
/dist/ | ||
/vendor/ | ||
composer.lock |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ Please take a quick look at this document before to make contribution process ea | |
|
||
h2. License | ||
|
||
"GNU General Public License, version 2":https://github.com/gocom/rah_flat/blob/master/LICENSE. By contributing code, you agree to license your additions under the GPLv2 license. | ||
"GNU General Public License, version 2":https://github.com/gocom/rah_flat/blob/master/LICENSE. | ||
|
||
h2. Configure git | ||
|
||
|
@@ -15,22 +15,18 @@ $ git config --global user.email [email protected] | |
|
||
Make sure to use an email address that is linked to your GitHub account. It can be a throwaway address or you can use GitHub's email protection features. We don't want your emails, but this is to make sure we know who did what. All commits nicely link to their author, instead of them coming from [email protected]. | ||
|
||
h2. Dependencies | ||
h2. Development | ||
|
||
Dependencies are managed using "Composer":https://getcomposer.org. After you have cloned the repository, run composer install: | ||
For list of available commands, run: | ||
|
||
bc. $ composer install | ||
|
||
And update before testing and committing: | ||
|
||
bc. $ composer update | ||
bc. $ make help | ||
|
||
h2. Coding standard | ||
|
||
The project follows the "PSR-0":https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md and "PSR-2":https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide-meta.md standards with PHP 5.2 style namespacing. You can use PHP_CodeSniffer to make sure your additions follow them too: | ||
|
||
bc. $ composer cs | ||
bc. $ make lint | ||
|
||
h2. Versioning | ||
|
||
"Semantic Versioning":https://semver.org/ and major.minor.path format. | ||
"Semantic Versioning":https://semver.org/. |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.PHONY: all clean compile help lint lint-fix | ||
|
||
PHP = docker-compose run --rm php | ||
|
||
all: lint | ||
|
||
vendor: | ||
$(PHP) composer --ignore-platform-req=ext-memcached install | ||
|
||
clean: | ||
$(PHP) rm -rf vendor composer.lock | ||
|
||
lint: vendor | ||
$(PHP) composer lint | ||
|
||
lint-fix: vendor | ||
$(PHP) composer lint-fix | ||
|
||
compile: vendor | ||
$(PHP) composer compile | ||
|
||
help: | ||
@echo "Manage project" | ||
@echo "" | ||
@echo "Usage:" | ||
@echo " $$ make [command]" | ||
@echo "" | ||
@echo "Commands:" | ||
@echo "" | ||
@echo " $$ make lint" | ||
@echo " Lint code style" | ||
@echo "" | ||
@echo " $$ make lint-fix" | ||
@echo " Lint and fix code style" | ||
@echo "" | ||
@echo " $$ make compile" | ||
@echo " Compiles the plugin" | ||
@echo "" | ||
@echo " $$ make clean" | ||
@echo " Delete installed dependencies" | ||
@echo "" | ||
@echo " $$ make vendor" | ||
@echo " Install dependencies" | ||
@echo "" |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '3.2' | ||
|
||
services: | ||
php: | ||
image: composer:2.3 | ||
volumes: | ||
- .:/app | ||
- ${COMPOSER_HOME:-$HOME/.composer}:/tmp | ||
networks: | ||
- app | ||
|
||
networks: | ||
app: | ||
driver: bridge |