Skip to content

Commit

Permalink
publish the real thing
Browse files Browse the repository at this point in the history
  • Loading branch information
cldellow committed Jan 16, 2024
1 parent 809430e commit 47f151b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# - name: Create DB
# run: ./create-qrank-db
- name: Create DB
run: ./create-qrank-db

- name: Publish DB
env:
Expand Down
8 changes: 4 additions & 4 deletions publish-qrank-db
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail
RELEASE_ID=137136562

list_existing() {
curl --verbose --fail -L \
curl --silent --fail -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
Expand All @@ -15,7 +15,7 @@ list_existing() {
delete_existing() {
while read -r asset_id; do
echo "deleting ${asset_id}"
curl --verbose --fail -L \
curl --silent --fail -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
Expand All @@ -25,14 +25,14 @@ delete_existing() {
}

publish() {
curl --verbose --fail -L \
curl --silent --fail -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/octet-stream" \
"https://uploads.github.com/repos/hikeratlas/qrank/releases/${RELEASE_ID}/assets?name=qrank.db" \
--data-binary "@README.md"
--data-binary "@qrank.db"
}

delete_existing
Expand Down

0 comments on commit 47f151b

Please sign in to comment.