mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-13 14:43:03 +00:00
Merge remote-tracking branch 'origin/master' into nightly
This commit is contained in:
commit
cadc8c0cc1
39
.github/workflows/release.yml
vendored
39
.github/workflows/release.yml
vendored
@ -10,6 +10,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@ -23,11 +24,9 @@ jobs:
|
|||||||
# https://pyinstaller.org/en/stable/usage.html#making-gnu-linux-apps-forward-compatible
|
# https://pyinstaller.org/en/stable/usage.html#making-gnu-linux-apps-forward-compatible
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
locale: C.UTF-8
|
locale: C.UTF-8
|
||||||
gh_os: linux
|
|
||||||
# https://endoflife.date/macos
|
# https://endoflife.date/macos
|
||||||
- os: macos-10.15
|
- os: macos-10.15
|
||||||
locale: en_US.UTF-8
|
locale: en_US.UTF-8
|
||||||
gh_os: macOs
|
|
||||||
env:
|
env:
|
||||||
LC_ALL: ${{ matrix.locale }}
|
LC_ALL: ${{ matrix.locale }}
|
||||||
LANG: ${{ matrix.locale }}
|
LANG: ${{ matrix.locale }}
|
||||||
@ -40,6 +39,8 @@ jobs:
|
|||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
|
cache: 'pip'
|
||||||
|
cache-dependency-path: requirements/dev.txt
|
||||||
- name: Upgrade pip and setuptools
|
- name: Upgrade pip and setuptools
|
||||||
# https://pypi.org/project/pip/
|
# https://pypi.org/project/pip/
|
||||||
# https://pypi.org/project/setuptools/
|
# https://pypi.org/project/setuptools/
|
||||||
@ -51,22 +52,44 @@ jobs:
|
|||||||
run: make bootstrap-dev-plugins
|
run: make bootstrap-dev-plugins
|
||||||
|
|
||||||
##### Run tests, generate bundle
|
##### Run tests, generate bundle
|
||||||
- name: Run tests
|
# - name: Run tests
|
||||||
run: make test
|
# run: make test
|
||||||
- name: Create bundle
|
- name: Create bundle
|
||||||
run: make bundle
|
run: make bundle
|
||||||
- name: Test bundle
|
# - name: Test bundle
|
||||||
run: make ci-test-bundle
|
# run: make ci-test-bundle
|
||||||
|
|
||||||
|
##### Download gh utility: https://github.com/cli/cli/releases
|
||||||
|
# This is unnecessary on GitHub, but useful when running locally with act.
|
||||||
|
# WARNING: this will only work on amd64
|
||||||
|
- name: Check or download gh utility
|
||||||
|
run: |
|
||||||
|
if ! which gh; then
|
||||||
|
echo "Downloading 'gh' utility"
|
||||||
|
if [ "$(uname -s)" = "Linux" ]; then
|
||||||
|
curl -L -o gh.tar.gz https://github.com/cli/cli/releases/download/v2.28.0/gh_2.28.0_linux_amd64.tar.gz
|
||||||
|
tar xzf gh.tar.gz
|
||||||
|
mv ./gh_2.28.0_linux_amd64/bin/gh /usr/local/bin/gh
|
||||||
|
else
|
||||||
|
curl -L -o gh.zip https://github.com/cli/cli/releases/download/v2.28.0/gh_2.28.0_macOS_amd64.zip
|
||||||
|
unzip xzf gh.zip
|
||||||
|
mv ./gh_2.28.0_macOS_amd64/bin/gh /usr/local/bin/gh
|
||||||
|
fi
|
||||||
|
which gh
|
||||||
|
fi
|
||||||
|
|
||||||
##### Create release on GitHub
|
##### Create release on GitHub
|
||||||
- name: Create or update GitHub release
|
- name: Create or update GitHub release
|
||||||
run: scriv github-release
|
run: scriv github-release --repo=overhangio/tutor
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
# scriv command will fail when not on a tag, such as running with act or a
|
||||||
|
# manual trigger.
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
- name: Upload release asset to GitHub
|
- name: Upload release asset to GitHub
|
||||||
run: |
|
run: |
|
||||||
export FILENAME="tutor-$(uname -s)_$(uname -m)"
|
export FILENAME="tutor-$(uname -s)_$(uname -m)"
|
||||||
mv ./dist/tutor $FILENAME
|
mv ./dist/tutor $FILENAME
|
||||||
gh release upload --clobber ${{ github.ref_name }} $FILENAME
|
gh release upload --clobber v$(make version) $FILENAME
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -15,6 +15,8 @@ jobs:
|
|||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
|
cache: 'pip'
|
||||||
|
cache-dependency-path: requirements/dev.txt
|
||||||
- name: Upgrade pip
|
- name: Upgrade pip
|
||||||
run: python -m pip install --upgrade pip setuptools==44.0.0
|
run: python -m pip install --upgrade pip setuptools==44.0.0
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
Loading…
Reference in New Issue
Block a user