Skip to content

Commit 291a7d6

Browse files
committed
change dev release address
1 parent 3779951 commit 291a7d6

File tree

5 files changed

+21
-27
lines changed

5 files changed

+21
-27
lines changed

.drone.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,13 @@ kind: pipeline
22
type: exec
33
name: default
44

5-
clone:
6-
disable: true
7-
85
trigger:
96
branch:
10-
- dev
7+
- dev-release
118
event:
129
- push
1310

1411
steps:
15-
- name: clone
16-
commands:
17-
- sleep 300 # wait aliyun repo to sync
18-
- git init
19-
- git remote add aliyun "https://code.aliyun.com/wang0618/pywebio.git"
20-
- git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 aliyun $DRONE_BRANCH
21-
- git checkout --progress --force -B $DRONE_BRANCH aliyun/$DRONE_BRANCH
22-
- git log -1
2312
- name: deploy demos
2413
commands:
2514
- | # https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#pipe-dockerfile-through-stdin

.github/workflows/sync_repo.yml renamed to .github/workflows/build_dev.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Sync with mirror repo
1+
name: build dev version
22
on:
33
push:
44
branches:
55
- dev
66
repository_dispatch:
77

88
jobs:
9-
sync:
9+
build_dev:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
@@ -32,20 +32,25 @@ jobs:
3232
cd docs && CODE_EXPORT_PATH=../demos/doc_demos make clean html
3333
- name: Set dev version
3434
run: python3 tools/build_dev_version.py
35-
- name: Push
35+
- name: Release dev version
3636
run: |
37+
git config --global user.email "$(git log -n 1 --pretty=format:%ae)"
38+
git config --global user.name "${{ github.actor }}"
39+
40+
# ref: https://stackoverflow.com/questions/8536732/can-i-hold-git-credentials-in-environment-variables
41+
git config --global credential.helper '!f() { sleep 1; echo "username=${{ github.actor }}"; echo "password=${GH_TOKEN}"; }; f'
42+
3743
git fetch --unshallow origin
38-
git remote add aliyun "https://code.aliyun.com/wang0618/pywebio.git"
39-
git config credential.helper '!f() { sleep 1; echo "username=${ALIYUN_GIT_USER}"; echo "password=${ALIYUN_GIT_PASSWORD}"; }; f'
44+
git branch -D dev-release || true
45+
git checkout -b dev-release
46+
4047
rm .gitignore
4148
git add pywebio/__version__.py
4249
git add pywebio/html/js
4350
git add demos/doc_demos
44-
git config user.email "${ALIYUN_GIT_USER}"
45-
git config user.name "${ALIYUN_GIT_USER}"
46-
git commit --amend --no-edit
47-
git push -f -u aliyun --tags || true
48-
git push -f -u aliyun || true
51+
52+
git commit -m "Build at `date`"
53+
git push -f -u origin dev-release
4954
env:
50-
ALIYUN_GIT_USER: ${{ secrets.ALIYUN_GIT_USER }}
51-
ALIYUN_GIT_PASSWORD: ${{ secrets.ALIYUN_GIT_PASSWORD }}
55+
# This token is provided by Actions, you do not need to create your own token
56+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README-zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pip3 install -U pywebio
6565

6666
开发版安装:
6767
```bash
68-
pip3 install -U https://code.aliyun.com/wang0618/pywebio/repository/archive.zip
68+
pip3 install -U https://github.com/pywebio/PyWebIO/archive/dev-release.zip
6969
```
7070

7171
**系统要求**: PyWebIO要求 Python 版本在 3.5.2 及以上

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pip3 install -U pywebio
6464

6565
Development version:
6666
```bash
67-
pip3 install -U https://code.aliyun.com/wang0618/pywebio/repository/archive.zip
67+
pip3 install -U https://github.com/pywebio/PyWebIO/archive/dev-release.zip
6868
```
6969

7070
**Prerequisites**: PyWebIO requires Python 3.5.2 or newer

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Stable version::
2626

2727
Development version::
2828

29-
pip3 install -U https://code.aliyun.com/wang0618/pywebio/repository/archive.zip
29+
pip3 install -U https://github.com/pywebio/PyWebIO/archive/dev-release.zip
3030

3131
**Prerequisites**: PyWebIO requires Python 3.5.2 or newer
3232

0 commit comments

Comments
 (0)