Update Dependencies #212
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: Release Artifacts | |
on: | |
push: | |
paths-ignore: | |
- '.github/**' | |
- 'docker/**' | |
branches: | |
- main | |
jobs: | |
build_wheel: | |
name: Build Linux wheel | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Python dependencies | |
run: | | |
pip install wheel | |
pip install pyinstaller | |
pip install -r requirements.txt | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Install Node dependencies | |
run: npm ci | |
working-directory: feedcrawler/web_interface/vuejs_frontend | |
- run: npm run build | |
working-directory: feedcrawler/web_interface/vuejs_frontend | |
- name: Compile Linux wheel | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Upload Linux wheel | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-wheel | |
path: ./dist/* | |
build_exe: | |
name: Build Windows Exe | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Python dependencies | |
run: | | |
pip install wheel | |
pip install pyinstaller | |
pip install -r requirements.txt | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
- name: Install Node dependencies | |
run: npm ci | |
working-directory: feedcrawler/web_interface/vuejs_frontend | |
- run: npm run build | |
working-directory: feedcrawler/web_interface/vuejs_frontend | |
- name: Compile Windows Exe | |
run: | | |
$version = python feedcrawler/providers/version.py | |
pyinstaller --onefile -y -i "feedcrawler/web_interface/vuejs_frontend/public/favicon.ico" --noconsole --version-file "file_version_info.txt" --add-data "feedcrawler/web_interface/vuejs_frontend;web_interface/vuejs_frontend" "FeedCrawler.py" -n "feedcrawler-$version-standalone-win64" | |
- name: Upload Windows Exe | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-exe | |
path: ./dist/*.exe | |
release: | |
name: Release Artifacts | |
runs-on: ubuntu-latest | |
needs: [ build_wheel, build_exe ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install requirements | |
run: | | |
pip install twine | |
pip -U packaging | |
- name: Get Version | |
run: echo "version=$(python feedcrawler/providers/version.py)" >>$GITHUB_OUTPUT | |
id: version | |
- name: Generate commit changelog | |
id: changelog | |
uses: metcalfc/[email protected] # this requires at least one release tag in the repo! | |
with: | |
myToken: ${{ secrets.GITHUB_TOKEN }} | |
- name: Append commit changelog | |
run: | | |
echo -e "\n${{ steps.changelog.outputs.changelog }}" >> .github/Changelog.md | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "./artifact-wheel/*.whl,./artifact-exe/*.exe" | |
artifactErrorsFailBuild: true | |
bodyFile: ".github/Changelog.md" | |
tag: v.${{ steps.version.outputs.version }} | |
- name: Upload to PyPI | |
run: | | |
python -m twine upload ./artifact-wheel/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} | |
- name: Trigger Docker Image build | |
run: | | |
curl -XPOST -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/rix1337/FeedCrawler/actions/workflows/BuildImage.yml/dispatches --data '{"ref": "main", "inputs": {"version": "${{ steps.version.outputs.version }}"}"}' |