diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml new file mode 100644 index 00000000..f27723b3 --- /dev/null +++ b/.github/workflows/debian.yml @@ -0,0 +1,45 @@ +name: Debian + +on: + workflow_dispatch: + push: + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + recursive: true + fetch-depth: 1 + + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.9 + architecture: x64 + + - name: Build Debian/Apt package + run: | + sudo apt install -y dh-python + pip install --upgrade pip setuptools wheel stdeb + ./bin/build_deb.sh + + - name: Install archivebox from deb + run: | + apt install deb_dist/archivebox*.deb + + - name: Add some links to test + run: | + mkdir data && cd data + archivebox init + archivebox add 'https://example.com' + archivebox version + archivebox status + + # TODO: push debian package to launchpad PPA + # - name: Push to launchpad + # run: | + # dput archivebox "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes" diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8ae12abf..9e3aa52a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,4 +1,4 @@ -name: Docker Push +name: Docker on: workflow_dispatch: diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml new file mode 100644 index 00000000..4ddbdfdf --- /dev/null +++ b/.github/workflows/homebrew.yml @@ -0,0 +1,33 @@ +name: Homebrew + +on: + workflow_dispatch: + push: + + +jobs: + build: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + with: + recursive: true + fetch-depth: 1 + + - name: Build Homebrew Bottle + run: | + pip3 install --uprade pip setuptools wheel + cd brew_dist/ + brew install --build-bottle ./archivebox.rb + brew bottle archivebox + + - name: Add some links to test + run: | + mkdir data && cd data + archivebox init + archivebox add 'https://example.com' + archivebox version + archivebox status + + # TODO: push bottle to Github and open homebrew core PR with latest changes diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 660b62ec..38e5b3ce 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,8 @@ -name: 'Lint' -on: [push] +name: Lint + +on: + workflow_dispatch: + push: env: MAX_LINE_LENGTH: 110 @@ -16,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.9 architecture: x64 - name: Install flake8 diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml new file mode 100644 index 00000000..f671d500 --- /dev/null +++ b/.github/workflows/pip.yml @@ -0,0 +1,41 @@ +name: Pip + +on: + workflow_dispatch: + push: + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + recursive: true + fetch-depth: 1 + + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.9 + architecture: x64 + + - name: Build Python Package + run: | + pip3 install --uprade pip setuptools wheel + python3 setup.py \ + sdist --dist-dir=./pip_dist \ + bdist_wheel --dist-dir=./pip_dist \ + egg_info --egg-base=./pip_dist + pip install pip_dist/archivebox-*.whl + + - name: Add some links to test + run: | + mkdir data && cd data + archivebox init + archivebox add 'https://example.com' + archivebox version + archivebox status + + # TODO: push to PyPI with twine diff --git a/bin/build_brew.sh b/bin/build_brew.sh index 5730ec1b..9767013d 100644 --- a/bin/build_brew.sh +++ b/bin/build_brew.sh @@ -12,7 +12,6 @@ IFS=$'\n' REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" -source "$REPO_DIR/.venv/bin/activate" cd "$REPO_DIR/brew_dist"