Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/release-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Download the binary for your platform using:

```bash
TAG=TAG_PLACEHOLDER \
OS="$(uname -s | tr '[:upper:]' '[:lower:]')" \
RELEASE_URL="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/sourcegraph/scip-ruby/releases/download/$TAG" \
curl -L "$RELEASE_URL/scip-ruby-$OS-x86_64" -o scip-ruby && \
chmod +x scip-ruby
```

NOTE: The `-debug*` binaries are meant for debugging issues
(for example, if you run into a crash with `scip-ruby`),
and are not recommended for general use.
46 changes: 33 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ jobs:
run: |
TAG="${GITHUB_REF/refs\/tags\//}"
TITLE="$(echo "$TAG" | sed 's/-v/ v/')"
gh release create "$TAG" --title "$TITLE"
cat .github/workflows/release-template.md \
| sed -e "s/TAG_PLACEHOLDER/$TAG/" \
> notes
gh release create "$TAG" --title "$TITLE" --notes-file notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -30,22 +33,37 @@ jobs:
TAG: ${{ github.event.ref }}
steps:
- uses: actions/checkout@v3
- name: Install Bazel
run: |
if ! which bazelisk; then
sudo npm install --location=global @bazel/bazelisk
fi
- name: Identify OS
- name: "⚙️ Setup Bazel"
run: .github/workflows/setup-bazel.sh
- name: "🚀 Mount Bazel build cache"
uses: actions/cache@v3
with:
path: ~/bazelcache/build
key: bazel-build-${{ runner.os }}
restore-keys: |
bazel-build-${{ runner.os }}
bazel-build-
- name: "🚀 Mount Bazel repo cache"
uses: actions/cache@v3
with:
path: ~/bazelcache/repos
key: bazel-repos-${{ runner.os }}
restore-keys: |
bazel-repos-${{ runner.os }}
bazel-repos-
- name: "🔎 Identify OS"
run: |
case "$(uname -s)" in
Linux*) os="linux";;
Darwin*) os="darwin";;
*) echo "Unhandled OS type" && exit 1;;
esac
echo "OS=$os" >> "$GITHUB_ENV"
- name: Run debug build
run: bazel build //main:scip-ruby --config=dbg
- name: Upload debug binary
- name: "🏗 Build (debug)"
run: ./bazel build //main:scip-ruby --config=dbg --explain log --verbose_explanations
- name: "🪵 Print log"
run: cat log && rm log
- name: "📦 Upload debug binary"
run: |
ls bazel-out
debugBinaryPath="scip-ruby-debug-$OS-$(uname -m)"
Expand All @@ -55,9 +73,11 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OS: ${{ env.OS }}
- name: Run release build
run: bazel build //main:scip-ruby
- name: Upload release binary
- name: "🏗 Build (release)"
run: bazel build //main:scip-ruby --explain log --verbose_explanations
- name: "🪵 Print log"
run: cat log && rm log
- name: "📦 Upload release binary"
run: |
ls bazel-out
releaseBinaryPath="scip-ruby-$OS-$(uname -m)"
Expand Down
5 changes: 5 additions & 0 deletions scip-ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,8 @@ gh pr create -R sourcegraph/scip-ruby
```

This will correctly use the `scip-ruby/master` branch as the target.

## Cutting a release

Push a tag of the form `scip-ruby-v*` to `scip-ruby/master`.
See the [release workflow](/.github/workflows/release.yml) for details.