From 582439c864cf84e4d0d6a536320ce0b8b1300f50 Mon Sep 17 00:00:00 2001 From: Razvan Mahu Date: Tue, 15 Feb 2022 19:54:05 +0000 Subject: [PATCH] Revert "fix: publish (#1299)" This reverts commit 9ce91437e6358d9670b38242106eff4794df82d4. --- .github/workflows/ci.yml | 1 - .github/workflows/publish-python-package.yml | 101 ++++++++++--------- 2 files changed, 52 insertions(+), 50 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17a8d3bef..7d346e9d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,6 @@ 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: diff --git a/.github/workflows/publish-python-package.yml b/.github/workflows/publish-python-package.yml index 34c909eee..8fa2dd510 100644 --- a/.github/workflows/publish-python-package.yml +++ b/.github/workflows/publish-python-package.yml @@ -10,8 +10,7 @@ on: # - completed jobs: publish-pypi-packages: - name: Publish PyPi Packages - if: ${{ github.event.pusher.name != 'actions-user' }} + name: Debug - Publish PyPi Packages # if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-18.04 steps: @@ -20,50 +19,54 @@ jobs: with: fetch-depth: 0 persist-credentials: false - - 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', - }); + # 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', + # });