Skip to content

Commit

Permalink
Upload complete source tarball as release asset
Browse files Browse the repository at this point in the history
Contrary to auto-generated release tarballs, this one includes all
submodules such that operating system infrastructure gets a complete
source tree wihtout having to fetch submodules themself.

Add "-full" between name and version to distinguish the two tarballs.

The token needs read/write permissions to clone the repository and
upload assets to existing releases, respectively.

Fixes web-eid#274

Signed-off-by: Klemens Nanni <[email protected]>
  • Loading branch information
klemensn committed Sep 29, 2023
1 parent 2725dd1 commit e40b56d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release-tarball.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release Tarball

on:
release:
types: [published]

jobs:
upload-release-tarball:
name: upload complete source code for release
runs-on: ubuntu-latest

steps:
- name: checkout tagged release recursively incl. submodules
uses: actions/checkout@v3
with:
submodules: recursive

- name: set environment variables
run: |
RELEASE_TARBALL_NAME="${{ github.repository }}"
RELEASE_TARBALL_NAME="${RELEASE_TARBALL_NAME#*/}-full-${{ github.ref_name }}"
RELEASE_TARBALL_PATH="./${RELEASE_TARBALL_NAME}.tar.gz"
echo "RELEASE_TARBALL_NAME=${RELEASE_TARBALL_NAME}" >> "${GITHUB_ENV}"
echo "RELEASE_TARBALL_PATH=${RELEASE_TARBALL_PATH}" >> "${GITHUB_ENV}"
- name: create compressed tarball with git-archive(1)
uses: qmonnet/git-archive-all-action@v1
with:
prefix: ${{ format('{0}/', env.RELEASE_TARBALL_NAME) }}
output-files: ${{ env.RELEASE_TARBALL_PATH }}

- name: upload static release asset
uses: svenstaro/upload-release-action@v2
with:
file: ${{ env.RELEASE_TARBALL_PATH }}

0 comments on commit e40b56d

Please sign in to comment.