From f3e14a705f7d198992ae8135df3abe44290c8e26 Mon Sep 17 00:00:00 2001 From: Andreas Zwinkau Date: Mon, 24 Aug 2026 16:27:19 +0200 Subject: [PATCH] feat: explicitly package release The links GitHub provides out of the box are not a stable solution. Example: https://github.com/eclipse-score/docs-as-code/archive/refs/tags/v8.0.0.tar.gz --- .github/workflows/release.yml | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..59ad55de8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,45 @@ +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +name: Release Module + +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + archive: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name }} + + - name: Create source archive + run: | + git archive \ + --format=tar.gz \ + --prefix="module/" \ + -o "bzlmod-${{ github.event.release.tag_name }}.tar.gz" \ + HEAD + + - name: Upload to release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release upload "${{ github.event.release.tag_name }}" \ + "bzlmod-${{ github.event.release.tag_name }}.tar.gz"