release 4.037 #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Release on Tag | |
on: | |
push: | |
tags: | |
- '4.[0-9][0-9][0-9]' | |
jobs: | |
release_netdisco_mibs: | |
if: github.repository == 'netdisco/netdisco-mibs' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get the Tag | |
run: echo "GH_REF_SHORT=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV | |
- name: Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: netdisco-mibs-${{ env.GH_REF_SHORT }} | |
continue-on-error: true | |
- name: Download tarball | |
run: curl -LO https://github.com/netdisco/netdisco-mibs/archive/refs/tags/${{ env.GH_REF_SHORT }}.tar.gz | |
- name: Rename tarball | |
run: mv ${{ env.GH_REF_SHORT }}.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 | |
id: upload_tarball_after_release | |
run: | | |
curl \ | |
-f \ | |
-sSL \ | |
-XPOST \ | |
-H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ | |
-H 'Content-Type: application/gzip' \ | |
--upload-file 'netdisco-mibs.tar.gz' \ | |
'${{ env.UPLOAD_URL }}=netdisco-mibs.tar.gz' | |
continue-on-error: true | |
- name: IRC upload failure notification | |
if: (steps.create_release.outcome == 'failure') || (steps.upload_tarball_after_release.outcome == 'failure') | |
uses: Gottox/irc-message-action@v2 | |
with: | |
channel: '#netdisco' | |
nickname: github-actions | |
message: |- | |
🤖 Failed to release Netdisco MIBS ${{ env.GH_REF_SHORT }} 😭 | |
👀 https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
- name: IRC upload success notification | |
if: steps.upload_tarball_after_release.outcome == 'success' | |
uses: Gottox/irc-message-action@v2 | |
with: | |
channel: '#netdisco' | |
nickname: github-actions | |
message: |- | |
🤖 Released Netdisco MIBS ${{ env.GH_REF_SHORT }} 🎉 | |