summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorredtide <redtid3@gmail.com>2022-01-15 11:24:44 +0100
committerFilipe Coelho <falktx@falktx.com>2022-01-15 11:19:04 +0000
commit4ec3b62dfc4c9076c294e0e62a7a1a3eaf87fbe8 (patch)
tree0a9e95956768a4ebefc9b947af7b56ff9cf6acdf
parentb750dd99e484f03f12bc4e0aee4c745812337be8 (diff)
downloadjack1-4ec3b62dfc4c9076c294e0e62a7a1a3eaf87fbe8.tar.gz
CI automated tarball creation and deployment
-rw-r--r--.gitattributes3
-rw-r--r--.github/workflows/build.yml50
2 files changed, 53 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..8f9c728
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,3 @@
+# Archive: ignore dotfiles
+.* export-ignore
+.*/** export-ignore
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..ce98277
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,50 @@
+name: Release tarball archive
+on:
+ push:
+ tags:
+ - '[0-9]*'
+jobs:
+ archive_source_code:
+ if: startsWith(github.ref, 'refs/tags/')
+ name: Source Code Tarball
+ runs-on: ubuntu-18.04
+ env:
+ ARCHIVE_BASENAME: jack1-${{ github.ref_name }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ submodules: recursive
+ - name: Dependencies setup
+ run: |
+ sudo apt-get update
+ sudo apt-get install python-pip
+ sudo pip install git-archive-all
+ - name: Archive source code
+ shell: bash
+ run: |
+ cd "${GITHUB_WORKSPACE}"
+ git-archive-all --prefix="${ARCHIVE_BASENAME}/" -9 "${{runner.workspace}}/${ARCHIVE_BASENAME}.tar.gz"
+ - uses: actions/upload-artifact@v2
+ with:
+ name: Source code tarball
+ path: ${{runner.workspace}}/${{env.ARCHIVE_BASENAME}}.tar.gz
+ deploy:
+ if: startsWith(github.ref, 'refs/tags/')
+ runs-on: ubuntu-18.04
+ needs:
+ - archive_source_code
+ steps:
+ - uses: actions/download-artifact@v2
+ with:
+ name: Source code tarball
+ - uses: softprops/action-gh-release@v1
+ env:
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+ with:
+ tag_name: ${{ github.ref_name }}
+ name: Release ${{ github.ref_name }}
+ draft: false
+ prerelease: false
+ files: |
+ jack1-${{ github.ref_name }}.*