From ba7dcfcb9020d5ed03af633f1c272850cc0b48c2 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Tue, 17 Aug 2021 17:35:54 +0100 Subject: [PATCH] upload manually --- .github/workflows/release.yml | 19 +++++++++++++++++++ .github/workflows/uploadtarball.yml | 21 --------------------- 2 files changed, 19 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/uploadtarball.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b850c0cf..986d3c8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,3 +17,22 @@ jobs: uses: softprops/action-gh-release@v1 with: 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 + diff --git a/.github/workflows/uploadtarball.yml b/.github/workflows/uploadtarball.yml deleted file mode 100644 index e19493bc..00000000 --- a/.github/workflows/uploadtarball.yml +++ /dev/null @@ -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 }}