Skip to content

Commit

Permalink
Change version un package.json before building js
Browse files Browse the repository at this point in the history
  • Loading branch information
jpic authored and github-actions[bot] committed May 24, 2023
1 parent d2c7510 commit fc23568
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Build JS for dal_select2
run: |
chown -R app:app .
npm update -g npm
su - app -c "cd $(pwd) && npm install && npm run build"
- name: Fix permissions
run: chown -R app:app .
- name: Update npm
run: npm update -g npm
- name: Update version in setup.py and docs/conf.py
run: |
short=$(echo ${GITHUB_REF##*/} | grep -Eo '[^.]+\.[^.]+')
sed -i "s/version\": \"[^\"]*\"/version\": \"$short\"/" package.json
sed -i "s/version\": \"[^\"]*\"/version\": \"${GITHUB_REF##*/}\"/" package.json
sed -i "s/version=[^,]*,/version='${GITHUB_REF##*/}',/" setup.py
sed -i "s/release = [^,]*,/release = '${GITHUB_REF##*/}'/" docs/conf.py
sed -i "s/version = [^,]*,/version = '${GITHUB_REF##*/}'/" docs/conf.py
- name: Build js
run: su - app -c "cd $(pwd) && npm install && npm run build"
- name: Update changelog
run: |
export GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -39,6 +40,13 @@ jobs:
- name: Get last commit message
id: last-commit-message
run: echo "msg=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
- name: Build python package
run: python setup.py sdist
- name: Twine upload
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: twine upload dist/django-autocomplete-light-${GITHUB_REF##*/}.tar.gz
- name: Commit all generated files
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand All @@ -48,10 +56,3 @@ jobs:
commit_message: ${{ steps.last-commit-message.outputs.msg }}
branch: master
skip_fetch: true
- name: Build python package
run: python setup.py sdist
- name: Twine upload
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: twine upload dist/django-autocomplete-light-${GITHUB_REF##*/}.tar.gz
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@


3.9.5-rc6

2023-04-07 Release 3.9.5-rc6
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "django-autocomplete-light",
"version": "3.9",
"version": "3.9.8rc24",
"description": "A fresh approach to autocomplete implementations, specially for Django. Status: v3 stable, 2.x.x stable, 1.x.x deprecated. Please DO regularely ping us with your link at #yourlabs IRC channel https://django-autocomplete-light.readthedocs.io/",
"directories": {
"doc": "docs"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def read(fname):

setup(
name='django-autocomplete-light',
version='3.9.8rc20',
version='3.9.8rc24',
description='Fresh autocompletes for Django',
author='James Pic',
author_email='[email protected]',
Expand Down

0 comments on commit fc23568

Please sign in to comment.