Merge pull request #38 from androidWG/dev #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, test & upload new version | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Setup environment | |
run: | | |
python -m pip install packaging pipenv psutil | |
python setup.py setup | |
- name: Get pip cache dir | |
id: pipenv-cache | |
run: | | |
echo "dir=$(pipenv --venv)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pipenv-cache.outputs.dir }} | |
key: ${{ runner.os }}-pipenv-${{ hashFiles('Pipfile.lock') }} | |
- name: Run tests | |
run: python setup.py test | |
build: | |
strategy: | |
matrix: | |
os: [ windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Setup environment | |
run: | | |
python -m pip install packaging pipenv psutil | |
python setup.py setup | |
- name: Get pip cache dir | |
id: pipenv-cache | |
run: | | |
echo "dir=$(pipenv --venv)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pipenv-cache.outputs.dir }} | |
key: ${{ runner.os }}-pipenv-${{ hashFiles('Pipfile.lock') }} | |
- name: Build | |
run: python setup.py build | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Windows Installer | |
path: dist/discord.fm*setup*.exe |