summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2021-11-30 11:16:57 +1100
committerNathan Scott <nathans@redhat.com>2021-11-30 11:16:57 +1100
commit89b7c4c9f92baa03a19d7efe1fcc30860358f51a (patch)
tree540ebf6c47ee84a9ddb5a6248fdbc9219ecd79a3
parent78aefc2a993bd9f7b9682df58a907f87d2c33591 (diff)
parent42c04930213a651465c53c6c14525caed164ec04 (diff)
Merge branch 'release_action' of https://github.com/rofl0r/htop into rofl0r-release_action
-rw-r--r--.github/workflows/build_release.yml51
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml
new file mode 100644
index 00000000..8c879156
--- /dev/null
+++ b/.github/workflows/build_release.yml
@@ -0,0 +1,51 @@
+name: Build Source Release
+
+# Trigger whenever a release is created
+on:
+ release:
+ types:
+ - created
+
+jobs:
+ build:
+ name: build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ with:
+ submodules: true
+
+ - name: archive
+ id: archive
+ run: |
+ VERSION=${{ github.event.release.tag_name }}
+ PKGNAME="htop-$VERSION"
+ SHASUM=$PKGNAME.tar.xz.sha256
+ autoreconf -i
+ mkdir -p /tmp/$PKGNAME
+ mv * /tmp/$PKGNAME
+ mv /tmp/$PKGNAME .
+ TARBALL=$PKGNAME.tar.xz
+ tar cJf $TARBALL $PKGNAME
+ sha256sum $TARBALL > $SHASUM
+ echo "::set-output name=tarball::$TARBALL"
+ echo "::set-output name=shasum::$SHASUM"
+ - name: upload tarball
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ github.event.release.upload_url }}
+ asset_path: ./${{ steps.archive.outputs.tarball }}
+ asset_name: ${{ steps.archive.outputs.tarball }}
+ asset_content_type: application/gzip
+
+ - name: upload shasum
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ github.event.release.upload_url }}
+ asset_path: ./${{ steps.archive.outputs.shasum }}
+ asset_name: ${{ steps.archive.outputs.shasum }}
+ asset_content_type: text/plain

© 2014-2022 Faster IT GmbH | imprint | privacy policy