Skip to content

Commit

Permalink
Also pack source for release.
Browse files Browse the repository at this point in the history
The automatically created URLs from archives are not stable
  https://github.com/orgs/community/discussions/46034
so also craete a release artifact that we packed ourselves and
will stay as-is.

Since we pack the sources ourselves, we can replace "head"
with the current version number MODULE.bazel.
  • Loading branch information
hzeller committed Jan 19, 2025
1 parent b0bff04 commit 4bcc308
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions .github/workflows/verible-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ jobs:
echo "--- check potential problems ---"
./.github/bin/check-potential-problems.sh
- name: 📤 Upload performance graphs
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: "diag"
path: "**/plot_*.svg"

ClangTidy:
container: ubuntu:jammy
runs-on: [self-hosted, Linux, X64, gcp-custom-runners]
Expand Down Expand Up @@ -436,9 +429,41 @@ jobs:
rm c:/users/runneradmin/_bazel_runneradmin/*/java.log
PackReleaseSource:
name: 📦 Pack Sources
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Pack Sources
run: |
TAG_VERSION=$(git describe --match=v*)
MODULE_VERSION=$(git describe --match=v* 2>/dev/null \
| sed 's/v\([^-]*\)-\([0-9]*\)-.*/\1.\2/')
OUT_SRC=verible-${TAG_VERSION}
mkdir ../${OUT_SRC}
cp -r . ../${OUT_SRC}
# Bake in current version into MODULE.bazel
sed "s/\(.*version.*\"\)\(head\)\(\".*\)/\1${MODULE_VERSION}\3/" \
-i ../${OUT_SRC}/MODULE.bazel
tar --exclude=.git -cvzf ${OUT_SRC}.tar.gz ../${OUT_SRC}
- name: 📤 Upload Source tar
uses: actions/upload-artifact@v4
with:
path: verible-*.tar.gz

Release:
name: 📦 Release
needs: [ Check, MacOsBuild, WindowsBuild, PrepareVSPlugin ]
needs: [ Check, PackReleaseSource, MacOsBuild, WindowsBuild, PrepareVSPlugin ]
runs-on: ubuntu-20.04
permissions:
contents: write
Expand Down

0 comments on commit 4bcc308

Please # to comment.