-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): Prepare releases as a GH composite action instead of a workf…
…low (#134) * fix(ci): Prepare releases as a GH composite action instead of a workflow * Provide shell * Final touches * Restore releasing only on tags
- Loading branch information
1 parent
3d44ffd
commit d1fe2c7
Showing
12 changed files
with
161 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ runs: | |
######################################## | ||
# Setup | ||
######################################## | ||
- name: Free Disk Space (Ubuntu) | ||
- name: "🔧 Free Up Disk Space" | ||
uses: jlumbroso/[email protected] | ||
with: | ||
# this might remove tools that are actually needed, | ||
|
@@ -19,7 +19,7 @@ runs: | |
######################################## | ||
# Download and unpack cache | ||
######################################## | ||
- name: Mount bazel cache | ||
- name: "☁️ ⬇️ Restore bazel cache" | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: "~/.cache/bazel" | ||
|
@@ -29,3 +29,9 @@ runs: | |
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel', 'Cargo.Bazel.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-bazel- | ||
- name: "🧹 Clean bazel cache if we're preparing a new release" | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
# This is desirable to make sure bazel does not use stale pre-built binaries | ||
# Bazel actually keeps all intermediate objects so builds are still fast | ||
run: bazel clean | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,20 +13,20 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout Repository | ||
- name: "☁️ ⬇️ Checkout Repository" | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
- name: "🔧 Set up Python" | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install dependencies | ||
- name: "🔧 Install dependencies" | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install mkdocs mkdocs-material | ||
- name: Deploy to GitHub Pages | ||
- name: "🚢 Deploy to GitHub Pages" | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Prepare release | ||
description: Prepare a new GitHub release | ||
|
||
inputs: | ||
github_token: | ||
description: 'A GitHub token with permissions to create releases' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: "⚒️ Extract binaries from bazel, so they can be pushed as GitHub artifacts in the next steps" | ||
shell: bash | ||
run: | | ||
set -eExuo pipefail | ||
# query the location of the bazel "dre" binary and copy it to the "release" directory | ||
mkdir -p release | ||
cp --dereference bazel-out/k8-opt/bin/rs/cli/dre release/dre | ||
- name: "🆕 📢 Prepare release" | ||
# v0.1.15 | ||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 | ||
with: | ||
token: ${{ inputs.GITHUB_TOKEN }} | ||
body_path: CHANGELOG.md | ||
generate_release_notes: true | ||
draft: true | ||
prerelease: true | ||
files: | | ||
release/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.