From a8776b9c7c4b44265fe48840bf07f75973262c6f Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Wed, 16 Oct 2024 10:26:34 +0200 Subject: [PATCH] actions: vendor sources with submodules for releases --- .github/workflows/source-vendor.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/source-vendor.yml diff --git a/.github/workflows/source-vendor.yml b/.github/workflows/source-vendor.yml new file mode 100644 index 00000000000..d426aa845bf --- /dev/null +++ b/.github/workflows/source-vendor.yml @@ -0,0 +1,29 @@ +name: Checkout and Create Clean Tarball + +on: + workflow_dispatch: # Allows manual triggering + push: + branches: [ main ] + +jobs: + create-clean-tarball: + runs-on: ubuntu-latest + steps: + - name: Checkout repository with submodules + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Create clean tarball + run: | + # List excludes .git etc + git ls-files > files_to_include.txt + git submodule foreach --recursive 'git ls-files | sed "s|^|$path/|"' >> files_to_include.txt + + # Create a gzipped tarball using the list of files + tar -czf yosys-src-vendored.tar.gz -T files_to_include.txt + - name: Upload tarball artifact + uses: actions/upload-artifact@v3 + with: + name: clean-sources-tarball + path: yosys-src-vendored.tar.gz