Skip to content

use dotnet for parsing feeds #230

use dotnet for parsing feeds

use dotnet for parsing feeds #230

Workflow file for this run

name: Generate Podcast Data
on:
push:
branches:
- main
# Run on cron - every week
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
permissions: write-all
jobs:
generate-podcast-data:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [8.x]
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.x
cache: true
cache-dependency-path: FeedParser/packages.lock.json
- name: Restore Nuget Packages
run: dotnet restore FeedParser/FeedParser.csproj
- uses: actions/cache@v2
env:
cache-name: python-cache
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: 'Install python deps 🐍'
if: steps.python-cache.outputs.cache-hit != 'true'
run: pip3 install -r requirements.txt
- name: 'Build 🏗️'
run: dotnet build FeedParser/FeedParser.csproj
- name: 'Generate Files 🤖'
run: dotnet run --project FeedParser/FeedParser.csproj
- name: 'Generate Palette 🎨'
run: |
python3 scripts/generate.py
cp -r tmp/dist/podcasts_palettes dist/podcasts_palettes
cp LICENSE.txt dist/LICENSE.txt
cp docs/dataReadMe.md dist/ReadMe.md
mkdir dist/.github
mkdir dist/.github/workflows
cp scripts/templates/release.yml dist/.github/workflows/release.yml
- name: Verify Changed files 🐒
uses: tj-actions/[email protected]
id: verify-changed-files
with:
files: |
dist
- name: 'Deploy 💾'
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: release
FOLDER: dist
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}