Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: publish #1299

Merged
merged 2 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
tests:
name: Debug - Run tests
# if: ${{ github.event.pusher.name != 'actions-user' }}
# if: ${{ github.event.pusher.email != 'action@github.com' }}
runs-on: ubuntu-18.04
env:
Expand Down
101 changes: 49 additions & 52 deletions .github/workflows/publish-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
# - completed
jobs:
publish-pypi-packages:
name: Debug - Publish PyPi Packages
name: Publish PyPi Packages
if: ${{ github.event.pusher.name != 'actions-user' }}
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-18.04
steps:
Expand All @@ -19,54 +20,50 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
# TODO: remove next step
- name: Debug
run: echo '${{ toJSON(github.event.pusher) }}'
# TODO: uncomment below
# - name: Setup Python
# uses: actions/setup-python@v2
# with:
# python-version: "3.7"
# architecture: "x64"
# - name: Install pip requirements
# run: |
# pip install pipenv
# pipenv install --dev --system
# pip install -U git+https://github.com/ocadotechnology/codeforlife-portal.git#egg=codeforlife-portal #TODO: Remove as part of #688
# sudo apt-get install gettext
# - name: Prepare files for Crowdin
# run: |
# mkdir -p game/locale
# cd game && django-admin makemessages -l en_GB --no-wrap && cd -
# cd game && django-admin makemessages -l en_GB --no-wrap -d djangojs --ignore "static/game/js/foundation/*" && cd - # some files from foundation use '_' for their own purpose
# - name: Run Crowdin (Upload sources and download translations)
# uses: crowdin/github-action@1.0.13
# with:
# upload_sources: true
# download_translations: true
# push_translations: false
# project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
# token: ${{ secrets.CROWDIN_API_KEY }}
# - name: Fix translation files owner
# run: sudo chown -R $USER game/locale
# - name: Compile messages
# run: |
# pushd game
# django-admin compilemessages
# popd
# - name: Release rapid-router
# uses: relekang/python-semantic-release@master
# with:
# github_token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
# pypi_token: ${{ secrets.PYPI_TOKEN }}
# - name: Trigger staging deployment
# uses: actions/github-script@v4
# with:
# github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
# script: |
# github.actions.createWorkflowDispatch({
# owner: 'ocadotechnology',
# repo: 'codeforlife-deploy-appengine',
# workflow_id: 'deploy_staging.yml',
# ref: 'master',
# });
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
architecture: "x64"
- name: Install pip requirements
run: |
pip install pipenv
pipenv install --dev --system
pip install -U git+https://github.com/ocadotechnology/codeforlife-portal.git#egg=codeforlife-portal #TODO: Remove as part of #688
sudo apt-get install gettext
- name: Prepare files for Crowdin
run: |
mkdir -p game/locale
cd game && django-admin makemessages -l en_GB --no-wrap && cd -
cd game && django-admin makemessages -l en_GB --no-wrap -d djangojs --ignore "static/game/js/foundation/*" && cd - # some files from foundation use '_' for their own purpose
- name: Run Crowdin (Upload sources and download translations)
uses: crowdin/github-action@1.0.13
with:
upload_sources: true
download_translations: true
push_translations: false
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_API_KEY }}
- name: Fix translation files owner
run: sudo chown -R $USER game/locale
- name: Compile messages
run: |
pushd game
django-admin compilemessages
popd
- name: Release rapid-router
uses: relekang/python-semantic-release@master
with:
github_token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
- name: Trigger staging deployment
uses: actions/github-script@v4
with:
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
script: |
github.actions.createWorkflowDispatch({
owner: 'ocadotechnology',
repo: 'codeforlife-deploy-appengine',
workflow_id: 'deploy_staging.yml',
ref: 'master',
});