use curl for releases

pull/2/merge
Alpha Chen 2 years ago
parent 51f6ebcac3
commit eed506c94a
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -19,12 +19,28 @@ jobs:
- uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@v1
with: with:
bundler-cache: true bundler-cache: true
- run: bundle exec rake - run: bundle exec rake
- run: zip -rqj emoji.alfredsnippets build/* - run: cd build && zip -rq ../emoji.alfredsnippets .
- id: date - id: date
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- uses: ncipollo/release-action@v1 - name: Create release
with: run: |
artifacts: emoji.alfredsnippets UPLOAD_URL="$(
tag: ${{ steps.date.outputs.DATE }} curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/releases \
-d '{"tag_name":"${{ steps.date.outputs.DATE }}","target_commitish":"${{ github.action_ref }}"}' \
| jq --raw-output .upload_url)"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/zip" \
"${UPLOAD_URL/'{?name,label}'/?name=emoji.alfredsnippets}" \
--data-binary "@emoji.alfredsnippets"

Loading…
Cancel
Save