Skip to content

Commit

Permalink
CI: fix publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarmil committed Apr 5, 2020
1 parent 854685d commit a91aedf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Build
on:
push:
pull_request:
release:
types: [published]

jobs:
build:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
steps:
- name: Download nupkg
run: |
runs_url = "https://api.github.com/repos/${{github.repository}}/actions/workflows/build.yml/runs"
run_id = $(curl -s -H "Accept: application/vnd.github.antiope-preview+json" "$runs_url" \
| jq '.workflow_runs[] | select(.head_sha == "${{github.sha}}").id')
runs_url="https://api.github.com/repos/${{github.repository}}/actions/workflows/build.yml/runs"
run_id=$(curl -s -H "Accept: application/vnd.github.antiope-preview+json" "$runs_url" \
| jq '[.workflow_runs[] | select(.head_sha == "${{github.sha}}").id][0]')
artifacts_url = "https://api.github.com/repos/${{github.repository}}/actions/runs/$run_id/artifacts"
artifact_id = $(curl -s -H 'Accept: application/vnd.github.antiope-preview+json' \
artifacts_url="https://api.github.com/repos/${{github.repository}}/actions/runs/$run_id/artifacts"
artifact_id=$(curl -s -H 'Accept: application/vnd.github.antiope-preview+json' "$artifacts_url" \
| jq '.artifacts[0].id')
artifact_url = "https://${{secrets.GITHUB_PAT}}@api.github.com/repos/${{github.repository}}/actions/artifacts/$artifact_id/zip"
artifact_url="https://${{secrets.GH_PAT}}@api.github.com/repos/${{github.repository}}/actions/artifacts/$artifact_id/zip"
curl -L -o nuget.zip "$artifact_url"
unzip nuget.zip -d nuget
Expand Down

0 comments on commit a91aedf

Please sign in to comment.