Skip to content

Commit fa6f3b5

Browse files
committed
chore: upload binary to aliyun oss in release builds
1 parent d20ace1 commit fa6f3b5

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

Diff for: .circleci/config.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ build: &build
3232

3333
deploy: &deploy
3434
docker:
35-
- image: tsub/ghr:latest
35+
- image: broooooklyn/rust-python:latest
3636
working_directory: /mnt/crate
3737
steps:
3838
- attach_workspace:
@@ -43,7 +43,8 @@ deploy: &deploy
4343
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
4444
then
4545
export GIT_TAG="$(git describe --tags $(git rev-list --tags --max-count=1))"; \
46-
ghr -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" "${GIT_TAG}" build/lib/py_sourcemap/*.so
46+
ghr -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" "${GIT_TAG}" build/lib/py_sourcemap/*.so && \
47+
python upload-ali-oss.py
4748
else
4849
echo "Not a release, skipping publish"
4950
fi

Diff for: .travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ deploy:
3636
skip_cleanup: true
3737
on:
3838
tags: true
39+
40+
deploy:
41+
provider: script
42+
script: python upload-ali-oss.py
43+
on:
44+
tags: true

Diff for: Dockerfile

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM ubuntu:18.04
22

33
ARG PYTHON_VERSION=3.6
44

5+
ENV GHR_VERSION="0.9.0"
6+
57
ENV RUSTUP_HOME=/usr/local/rustup \
68
CARGO_HOME=/usr/local/cargo \
79
PATH=/usr/local/cargo/bin:$PATH \
@@ -18,11 +20,19 @@ RUN apt-get update && \
1820
if [ $PYTHON_VERSION = '3.6' ]; \
1921
then \
2022
apt-get install python3-pip -y --no-install-recommends && \
21-
ln -sf /usr/bin/pip3 /usr/bin/pip; \
23+
ln -sf /usr/bin/pip3 /usr/bin/pip && \
24+
pip install setuptools; \
2225
else \
2326
curl https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION}; \
2427
fi && \
25-
pip install --upgrade pip
28+
pip install --upgrade pip && \
29+
curl -fSL -o ghr.tar.gz "https://github.com/tcnksm/ghr/releases/download/v${GHR_VERSION}/ghr_v${GHR_VERSION}_linux_amd64.tar.gz" && \
30+
tar -xvzf ghr.tar.gz && \
31+
mv ghr_v${GHR_VERSION}_linux_amd64/ghr /usr/local/bin && \
32+
chown root:root /usr/local/bin/ghr && \
33+
rm -r \
34+
ghr.tar.gz \
35+
ghr_v${GHR_VERSION}_linux_amd64
2636

2737
RUN set -eux; \
2838
dpkgArch="$(dpkg --print-architecture)"; \

Diff for: appveyor.yml

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ artifacts:
7474
- path: build\lib\py_sourcemap\*.pyd
7575
name: Binary
7676

77+
before_deploy:
78+
- "%PYTHON%\\python.exe upload-ali-oss.py"
79+
7780
deploy:
7881
provider: GitHub
7982
description: $(APPVEYOR_REPO_TAG_NAME)

0 commit comments

Comments
 (0)