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

Lk/wf release #2045

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
73 changes: 62 additions & 11 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,81 @@ name: Publish package to PyPi

on:
push:
tags:
- '*'
branches:
- master

jobs:

push:
release:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2
- name: setup python

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install node packages
run: npm ci

- name: Build js
run: npm run build

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install pip
run: pip install -r requirements/pip.txt
- name: Install python Dependencies
run: |
pip install -r requirements/pip.txt
pip install -r requirements/ci.txt
pip install -r requirements/test.txt
pip install -r requirements/quality.txt
pip install -r requirements/test-acceptance.txt

- name: Install Transifex client
run: |
cd
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
cat $GITHUB_PATH
echo $(pwd) >> $GITHUB_PATH
cat $GITHUB_PATH

- name: Install GNU gettext
run: sudo apt-get install gettext

- name: Build package
- name: update translations
env:
TX_TOKEN: ${{ secrets.EDX_TRANSIFEX_BOT_GITHUB_TOKEN }}
run: |
make update_translations

- name: Release
env:
GH_TOKEN: ${{ secrets.CC_GITHUB_TOKEN }}
run: npx semantic-release

- name: Build python package
run: python setup.py sdist bdist_wheel

- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
repository-url: https://test.pypi.org/legacy/

# - name: Send failure notification
# if: ${{ failure() }}
# uses: dawidd6/action-send-mail@v3
# with:
# server_address: email-smtp.us-east-1.amazonaws.com
# server_port: 465
# username: ${{ secrets.EDX_SMTP_USERNAME }}
# password: ${{ secrets.EDX_SMTP_PASSWORD }}
# subject: Publish Pypi has failed in ${{github.repository}}
# to: masters-grades@edx.org
# from: github-actions <github-actions@edx.org>
# body: Publish Pypi workflow in ${{github.repository}} failed!
# For details see "github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ private.py
# pyenv
.python-version

!openassessment/xblock/static/dist/
openassessment/xblock/static/dist/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
20 changes: 20 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "node scripts/update_version.js ${nextRelease.version}"
}
],
"@semantic-release/github"
]
}
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ update-npm-requirements: ## update NPM requrements
cp ./node_modules/backgrid/lib/backgrid*.css $(STATIC_CSS)/lib/backgrid/

static: ## Webpack JavaScript and SASS source files
npm run dev && npm run build
npm run build

################
#Translations Handling
Expand Down Expand Up @@ -113,6 +113,8 @@ push_translations: ## push source translation files (.po) to Transifex

check_translations_up_to_date: extract_translations compile_translations generate_dummy_translations detect_changed_source_translations ## extract, compile, and check if translation files are up-to-date

update_translations: extract_translations compile_translations generate_dummy_translations pull_translations ## extract, compile, and pull translations from Transifex

################
#Tests and checks
################
Expand Down
3 changes: 1 addition & 2 deletions openassessment/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
Initialization Information for Open Assessment Module
"""

__version__ = '5.2.5'
__version__ = '0.0.0'
Loading