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 Jul 16, 2023
1 parent 0448f7e commit b0cb52f
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: |
NAME="${{ github.repository }}"
NAME="${NAME#*/}-full-${{ github.ref_name }}"
FILE="./${NAME}.tar.gz"
echo "NAME=${NAME}" >> "${GITHUB_ENV}"
echo "FILE=${FILE}" >> "${GITHUB_ENV}"
- name: create compressed tarball with git-archive(1)
uses: qmonnet/git-archive-all-action@v1
with:
prefix: ${{ format('{0}/', env.NAME) }}
output-files: ${{ env.FILE }}

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

0 comments on commit b0cb52f

Please sign in to comment.