upload manually

This commit is contained in:
Oliver Gorwits
2021-08-17 17:35:54 +01:00
parent 2cd611d720
commit ba7dcfcb90
2 changed files with 19 additions and 21 deletions

View File

@@ -17,3 +17,22 @@ jobs:
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
name: Netdisco ${{ steps.get_tag.outputs.TAGVALUE }} name: Netdisco ${{ steps.get_tag.outputs.TAGVALUE }}
- name: Download tarball
run: curl -O https://github.com/netdisco/netdisco/archive/refs/tags/${{ steps.get_tag.outputs.TAGVALUE }}.tar.gz
- name: Rename tarball
run: mv ${{ steps.get_tag.outputs.TAGVALUE }}.tar.gz netdisco-mibs.tar.gz
- name: Get upload URL
run: echo UPLOAD_URL=${{ steps.create_release.outputs.upload_url }} | cut -d ' ' -f 1 >> $GITHUB_ENV
- name: Upload tarball
run: |
curl \
-f \
-sSL \
-XPOST \
-H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \
-H 'Content-Type: application/gzip' \
--upload-file "${1}" \
'${{ env.UPLOAD_URL }}=netdisco-mibs.tar.gz'
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

View File

@@ -1,21 +0,0 @@
name: Upload Renamed Tarball
on: release
jobs:
upload_renamed_tarball:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get the Tag
id: get_tag
run: echo ::set-output name=TAGVALUE::${GITHUB_REF#refs/tags/}
- name: Download tarball
run: curl -O https://github.com/netdisco/netdisco/archive/refs/tags/${{ steps.get_tag.outputs.TAGVALUE }}.tar.gz
- name: Rename tarball
run: mv ${{ steps.get_tag.outputs.TAGVALUE }}.tar.gz netdisco-mibs.tar.gz
- name: Upload tarball
uses: JasonEtco/upload-to-release@master
with:
args: netdisco-mibs.tar.gz application/gzip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}