Skip to content

Workflow file for this run

name: Release new version
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false # use GITHUB_TOKEN
fetch-depth: 1 # fetch depth is nr of commits
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install cycler
- name: Install jq
uses: dcarbone/install-jq-action@v2
with:
version: 1.7
force: false
- name: 'Check jq'
run: |
jq --version
- name: Get Current pyriksdagen version
run: |
PRD_INFO="$(curl -L https://api.github.com/repos/swerik-project/pyriksdagen/releases/latest)"
PRD_TAG=="$(echo $PRD_INFO | jq -r .tag_name)"
- name: Download metadata and get repo version nr
run: |
PERSONS_INFO="$(curl -L https://api.github.com/repos/swerik-project/riksdagen-persons/releases/latest)"
PERSONS_TAG="$(echo $PERSONS_INFO | jq -r .tag_name)"
curl -LO "$(echo $PERSONS_INFO | jq -r .assets[0].browser_download_url)"
- name: Unzip metadata
run: |
mv persons.zip "persons_$PERSONS_TAG.zip"

Check failure on line 52 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 52
ls -la
unzip persons.zip
- name: Upload metadata to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: persons_$PERSONS_TAG.zip
tag: ${{ github.ref }}
- name: Download records and get repo version nr
run: |
RECORDS_INFO="$(curl -L https://api.github.com/repos/swerik-project/riksdagen-persons/releases/latest)"
RECORDS_TAG="$(echo $RECORDS_INFO | jq -r .tag_name)"
curl -LO "$(echo $RECORDS_INFO | jq -r .assets[0].browser_download_url)"
- name: Unzip records
run: |
unzip records.zip
mv records.zip "records_$RECORDS_TAG.zip"
- name: Upload records to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: records_$RECORDS_TAG.zip
tag: ${{ github.ref }}
- name: Calculate and Plot MP coverage
run: |
PYTHONPATH="$PYTHONPATH:." python readme/src/calculate-mp-coverage.py
PYTHONPATH="$PYTHONPATH:." python readme/src/plot-mp-coverage.py -v $RECORDS_TAG
- name: Estimate and Plot Speaker-Intro mapping
run: |
PYTHONPATH="$PYTHONPATH:." python readme/src/estimate-intro-mapping-accuracy.py -v $RECORDS_TAG --show False
- name: Generate README
run: |
PYTHONPATH="$PYTHONPATH:." python readme/src/generate-markdown.py -v ${{ github.ref }} -pv $PERSONS_TAG -rv $RECORDS_TAG -py $PRD_TAG
- name: Dump merged metadata
run: |
PYTHONPATH="$PYTHONPATH:." python dumps/src/dump-merged-meta-tables.py
- name: Zip dumps
run: zip -r dumps.zip dumps/dumps
- name: Upload dumps to zip
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dumps_${{ github.ref }}.zip
tag: ${{ github.ref }}
- name: Remove Hyyuuggee files
run: |
rm stats/mp-coverage/coverage.csv
- name: Add and Commit generated file
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add stats/
git commit -m "chore: update version stats"
git add plots/
git commit -m "chore: update version plots"
git add README.md
git commit -m "chore: update README."
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main