Cleanups #41
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
name: DEV | |
on: | |
push: | |
branches: | |
- dev | |
env: | |
TRUNK_BRANCH: dev-trunk | |
RELEASE_BRANCH: dev-rc | |
ENV_FILE: .env.dev | |
CROWDIN_YML: crowdin.github.yml | |
jobs: | |
deploy: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set dev version to timestamp | |
run: | | |
echo "VERSION=5.0.0-dev.1.0.$(date +%s)" >> ${GITHUB_ENV} | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install PHP and dependencies | |
run: sudo apt-get update && sudo apt-get install php php-mbstring php-xml | |
- name: Setup ENV files | |
run: cp ${{env.ENV_FILE}} .env | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: node_modules-${{hashFiles('package-lock.lock')}} | |
restore-keys: node_modules- | |
- name: Install NPM Dependencies | |
run: npm install && npm run namespace | |
- name: Install Composer dependencies | |
run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
- name: Build Scripts | |
run: npm run build | |
- name: Setup Crowdin file | |
run: cp ${{env.CROWDIN_YML}} crowdin.yml | |
- name: Upload translations to Crowdin | |
uses: crowdin/github-action@v2.1.3 | |
with: | |
upload_sources: true | |
upload_translations: false | |
download_translations: true | |
create_pull_request: false | |
push_translations: false | |
skip_untranslated_strings: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }} | |
- name: Make JSON from PO Files | |
run: npm run make-json | |
- name: Build Trunk and Relase files | |
run: npm run dist | |
- name: Release Trunk | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: ${{env.TRUNK_BRANCH}} | |
FOLDER: deploy | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release ZIP | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: ${{env.RELEASE_BRANCH}} | |
FOLDER: dist | |
SQUASH_HISTORY: true | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |