mirror of
https://github.com/captn3m0/microsoft-kb-metadata.git
synced 2024-09-19 15:57:01 +00:00
Update publish.yml
This commit is contained in:
parent
4f0be3f20f
commit
297dffd091
12
.github/workflows/publish.yml
vendored
12
.github/workflows/publish.yml
vendored
@ -6,7 +6,6 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
needs: update
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@ -15,18 +14,17 @@ jobs:
|
|||||||
- name: Set up Python 3.12
|
- name: Set up Python 3.12
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.10'
|
||||||
- name: Install csv-to-sqlite
|
- name: Install csvs-to-sqlite
|
||||||
run: pip install csv-to-sqlite
|
run: pip install csvs-to-sqlite
|
||||||
- name: Convert JSON to CSV
|
- name: Convert JSON to CSV
|
||||||
run: jq -r '"kb,date,url,slug,uuid", keys[] as $k | [$k] + [ .[$k].date, .[$k].url, .[$k].slug, .[$k].uuid ]|@csv' data.json > data.csv
|
run: jq -r '"kb,date,url,slug,uuid", keys[] as $k | [$k] + [ .[$k].date, .[$k].url, .[$k].slug, .[$k].uuid ]|@csv' data.json > data.csv
|
||||||
- name: Convert CSV to SQLite
|
- name: Convert CSV to SQLite
|
||||||
run: csv-to-sqlite -f data.csv -o data.sqlite --tables data --columns "date,uuid,url,slug,kb"
|
run: csvs-to-sqlite --table data --date date data.csv data.db
|
||||||
- name: Create and push tag
|
- name: Create and push tag
|
||||||
run: |
|
run: |
|
||||||
TAG_NAME=v$(date +'%Y.%m.%d')
|
TAG_NAME=v$(date +'%Y.%m.%d')
|
||||||
git tag $TAG_NAME
|
git tag $TAG_NAME
|
||||||
git push origin $TAG_NAME
|
git push origin $TAG_NAME
|
||||||
- name: Publish files to GitHub Releases
|
- name: Publish files to GitHub Releases
|
||||||
run: |
|
run: h release create $TAG_NAME data.json data.csv data.db --title "Release $TAG_NAME"
|
||||||
gh release create $TAG_NAME data.json data.csv data.sqlite --title "Release $TAG_NAME"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user