mirror of
https://github.com/httpie/cli.git
synced 2024-11-22 07:43:20 +01:00
Automatically attach debian packages and linux binaries to the release (#1390)
* Automatically attach debian packages and linux binaries to the release * Use set-output syntax
This commit is contained in:
parent
b54239b525
commit
11b2af0f59
21
.github/workflows/release-linux-standalone.yml
vendored
21
.github/workflows/release-linux-standalone.yml
vendored
@ -7,6 +7,9 @@ on:
|
|||||||
description: "The branch, tag or SHA to release from"
|
description: "The branch, tag or SHA to release from"
|
||||||
required: true
|
required: true
|
||||||
default: "master"
|
default: "master"
|
||||||
|
tag_name:
|
||||||
|
description: "Which release to upload the artifacts to (i.e., 3.0)"
|
||||||
|
required: true
|
||||||
|
|
||||||
release:
|
release:
|
||||||
types: [released, prereleased]
|
types: [released, prereleased]
|
||||||
@ -45,24 +48,30 @@ jobs:
|
|||||||
name: httpie.rpm
|
name: httpie.rpm
|
||||||
path: extras/packaging/linux/artifacts/dist/*.rpm
|
path: extras/packaging/linux/artifacts/dist/*.rpm
|
||||||
|
|
||||||
|
- name: Determine the release upload upload_url
|
||||||
|
id: release_id
|
||||||
|
run: |
|
||||||
|
pip install httpie
|
||||||
|
export API_URL="api.github.com/repos/httpie/httpie/releases/tags/${{ github.event.inputs.tag_name }}"
|
||||||
|
export UPLOAD_URL=`https --ignore-stdin GET $API_URL | jq -r ".upload_url"`
|
||||||
|
echo "::set-output name=UPLOAD_URL::$UPLOAD_URL"
|
||||||
|
|
||||||
- name: Publish Debian Package
|
- name: Publish Debian Package
|
||||||
if: github.event_name == 'release'
|
|
||||||
uses: actions/upload-release-asset@v1.0.2
|
uses: actions/upload-release-asset@v1.0.2
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ github.event.release.upload_url }}
|
upload_url: ${{ steps.release_id.outputs.UPLOAD_URL }}
|
||||||
asset_path: extras/packaging/linux/artifacts/dist/httpie-${{ github.event.release.tag_name }}.deb
|
asset_path: extras/packaging/linux/artifacts/dist/httpie_${{ github.event.inputs.tag_name }}_amd64.deb
|
||||||
asset_name: httpie-${{ github.event.release.tag_name }}.deb
|
asset_name: httpie-${{ github.event.inputs.tag_name }}.deb
|
||||||
asset_content_type: binary/octet-stream
|
asset_content_type: binary/octet-stream
|
||||||
|
|
||||||
- name: Publish Single Executable
|
- name: Publish Single Executable
|
||||||
if: github.event_name == 'release'
|
|
||||||
uses: actions/upload-release-asset@v1.0.2
|
uses: actions/upload-release-asset@v1.0.2
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ github.event.release.upload_url }}
|
upload_url: ${{ steps.release_id.outputs.UPLOAD_URL }}
|
||||||
asset_path: extras/packaging/linux/artifacts/dist/http
|
asset_path: extras/packaging/linux/artifacts/dist/http
|
||||||
asset_name: http
|
asset_name: http
|
||||||
asset_content_type: binary/octet-stream
|
asset_content_type: binary/octet-stream
|
||||||
|
Loading…
Reference in New Issue
Block a user