-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔄 Sync supportpal/addon-language-english (#1)
🔄 Sync https://github.com/supportpal/addon-language-english Co-authored-by: sync-bot <[email protected]>
- Loading branch information
1 parent
f428a84
commit 9da1ecd
Showing
10 changed files
with
243 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
##################################################################################### | ||
# WARNING # | ||
##################################################################################### | ||
# # | ||
# This file is synchronised across all supportpal/addon-language-* repositories. # | ||
# Be careful not to hardcode any paths, and only update it in the # | ||
# supportpal/addon-language-english repository! # | ||
# # | ||
##################################################################################### | ||
|
||
version: 2 | ||
|
||
updates: | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,47 @@ | ||
##################################################################################### | ||
# WARNING # | ||
##################################################################################### | ||
# # | ||
# This file is synchronised across all supportpal/addon-language-* repositories. # | ||
# Be careful not to hardcode any paths, and only update it in the # | ||
# supportpal/addon-language-english repository! # | ||
# # | ||
##################################################################################### | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set environment | ||
run: | | ||
ADDON_NAME="$(grep -rEho "^namespace Addons\\\\Languages\\\\([^\\\\]+)" Controllers/ | sed 's:.*\\::')" | ||
ADDON_NAME_LOWER="$(echo $ADDON_NAME | awk '{print tolower($0)}')" | ||
BASE_FILENAME="addon-$(echo $ADDON_NAME_LOWER)-${{ github.ref_name }}" | ||
echo "ADDON_NAME=$(echo $ADDON_NAME)" >> $GITHUB_ENV | ||
echo "ZIP_FILENAME=$(echo $BASE_FILENAME).zip" >> $GITHUB_ENV | ||
echo "TAR_FILENAME=$(echo $BASE_FILENAME).tar.gz" >> $GITHUB_ENV | ||
- name: Build Release | ||
run: | | ||
git archive --format=tar --prefix="${{ env.ADDON_NAME }}/" HEAD -o archive.tar | ||
tar -xf archive.tar | ||
rm -rf ${{ env.ADDON_NAME }}/.github/ | ||
zip -r ${{ env.ZIP_FILENAME }} ${{ env.ADDON_NAME }} | ||
tar -zcvf ${{ env.TAR_FILENAME }} ${{ env.ADDON_NAME }} | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
${{ env.ZIP_FILENAME }} | ||
${{ env.TAR_FILENAME }} |
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,53 @@ | ||
##################################################################################### | ||
# WARNING # | ||
##################################################################################### | ||
# # | ||
# This file is synchronised across all supportpal/addon-language-* repositories. # | ||
# Be careful not to hardcode any paths, and only update it in the # | ||
# supportpal/addon-language-english repository! # | ||
# # | ||
##################################################################################### | ||
name: test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
tools: composer:v2, supportpal/language-tools | ||
|
||
- name: PHP Syntax Check | ||
uses: overtrue/[email protected] | ||
with: | ||
path: . | ||
options: --exclude=vendor | ||
|
||
- name: Set environment | ||
run: | | ||
LANG_PATH=$(find Lang -mindepth 1 -maxdepth 1 -type d -print -quit) | ||
echo "LANG_PATH=$(echo $LANG_PATH)" >> $GITHUB_ENV | ||
echo "LANG_NAME=$(basename $LANG_PATH)" >> $GITHUB_ENV | ||
- name: Check out English | ||
if: ${{ env.LANG_NAME != 'en' }} | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: supportpal/addon-language-english | ||
path: addon-language-english/ | ||
ref: master | ||
|
||
- name: Code Quality | ||
if: ${{ env.LANG_NAME != 'en' }} | ||
run: | | ||
language-tools compare addon-language-english/Lang/en/ Lang/${{ env.LANG_NAME }} |
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