Skip to content

Commit

Permalink
release: Publish vendored code
Browse files Browse the repository at this point in the history
Currently we're not publishing the vendored code as part of the release,
which leads to all the downstream which do not have access to internet
whilst building their components to do this process manually.

Let's be nice to the downstreams, let's publish the vendors ourselves.

Signed-off-by: Fabiano Fidêncio <[email protected]>
  • Loading branch information
fidencio committed Sep 16, 2024
1 parent 075b9a9 commit 242ddfb
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/vendor_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Generate vendored content for the release

on:
release:
types: [published]

jobs:
generate-and-publish-vendored-code:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Generate and publish cargo vendored tarball
run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||')
tarball_name="guest-components-${tag}-vendor.tar.gz"
mkdir -p .cargo
cargo vendor --locked >> .cargo/config.toml
tar -cvzf ${tarball_name} vendor .cargo/config.toml
gh release upload ${tag} ${tarball_name}
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 242ddfb

Please sign in to comment.