Release 0.18.0

This commit is contained in:
github-actions 2026-01-11 16:34:54 +00:00
parent b607b8f591
commit 083175551c
7 changed files with 30 additions and 21 deletions

View file

@ -6,7 +6,7 @@ and provides an advanced fine-grained caching to improve workflows performance.
## Usage ## Usage
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
# Avoid downloading Bazel every time. # Avoid downloading Bazel every time.
bazelisk-cache: true bazelisk-cache: true
@ -39,7 +39,7 @@ Default `""`.
#### Install Bazelisk 1.x #### Install Bazelisk 1.x
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
bazelisk-version: 1.x bazelisk-version: 1.x
``` ```
@ -47,7 +47,7 @@ Default `""`.
#### Install exact Bazelisk version #### Install exact Bazelisk version
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
bazelisk-version: 1.19.0 bazelisk-version: 1.19.0
``` ```
@ -67,7 +67,7 @@ Default `""`.
#### Enable Bzlmod #### Enable Bzlmod
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
bazelrc: common --enable_bzlmod bazelrc: common --enable_bzlmod
``` ```
@ -75,7 +75,7 @@ Default `""`.
#### Add colors and timestamps #### Add colors and timestamps
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
bazelrc: | bazelrc: |
build --color=yes build --color=yes
@ -98,7 +98,7 @@ Default `true`.
#### Disable cache saving on pull requests #### Disable cache saving on pull requests
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.16.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
bazelisk-cache: true bazelisk-cache: true
disk-cache: ${{ github.workflow }} disk-cache: ${{ github.workflow }}
@ -121,7 +121,7 @@ Default `false`.
#### Share a single disk cache #### Share a single disk cache
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
disk-cache: true disk-cache: true
``` ```
@ -129,7 +129,7 @@ Default `false`.
#### Separate disk caches between workflows #### Separate disk caches between workflows
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
disk-cache: ${{ github.workflow }}} disk-cache: ${{ github.workflow }}}
``` ```
@ -153,7 +153,7 @@ Default `false`.
#### Enable external repositories caches #### Enable external repositories caches
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
external-cache: true external-cache: true
``` ```
@ -161,7 +161,7 @@ Default `false`.
#### Cache NPM repositories based on `package-lock.json` contents #### Cache NPM repositories based on `package-lock.json` contents
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
external-cache: | external-cache: |
manifest: manifest:
@ -171,7 +171,7 @@ Default `false`.
#### Do not cache Ruby on Windows #### Do not cache Ruby on Windows
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
external-cache: | external-cache: |
manifest: manifest:
@ -191,7 +191,7 @@ Default `""`.
#### Authenticate via key #### Authenticate via key
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
google-credentials: ${{ secrets.GOOGLE_CLOUD_KEY }} google-credentials: ${{ secrets.GOOGLE_CLOUD_KEY }}
``` ```
@ -222,7 +222,7 @@ Default is one of the following:
#### Use `C` drive letter #### Use `C` drive letter
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
output-base: C:/_bazel output-base: C:/_bazel
``` ```
@ -242,7 +242,7 @@ Default `false`.
#### Store a single repository cache #### Store a single repository cache
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
repository-cache: true repository-cache: true
``` ```
@ -250,14 +250,14 @@ Default `false`.
#### Store a repository cache from a custom location #### Store a repository cache from a custom location
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
repository-cache: examples/gem/WORKSPACE repository-cache: examples/gem/WORKSPACE
``` ```
#### Store a repository cache from a list of custom locations #### Store a repository cache from a list of custom locations
```yaml ```yaml
- uses: bazel-contrib/setup-bazel@0.17.0 - uses: bazel-contrib/setup-bazel@0.18.0
with: with:
repository-cache: | repository-cache: |
- MODULE.bazel - MODULE.bazel

2
dist/main/index.js vendored
View file

@ -11,6 +11,7 @@ const core = __nccwpck_require__(37484)
const github = __nccwpck_require__(93228) const github = __nccwpck_require__(93228)
const bazeliskVersion = core.getInput('bazelisk-version') const bazeliskVersion = core.getInput('bazelisk-version')
const cacheSave = core.getBooleanInput('cache-save')
const cacheVersion = core.getInput('cache-version') const cacheVersion = core.getInput('cache-version')
const moduleRoot = core.getInput('module-root') const moduleRoot = core.getInput('module-root')
@ -143,6 +144,7 @@ core.exportVariable('BAZELISK_GITHUB_TOKEN', token)
module.exports = { module.exports = {
baseCacheKey, baseCacheKey,
cacheSave,
bazeliskCache: { bazeliskCache: {
enabled: core.getBooleanInput('bazelisk-cache'), enabled: core.getBooleanInput('bazelisk-cache'),
files: [`${moduleRoot}/.bazelversion`], files: [`${moduleRoot}/.bazelversion`],

File diff suppressed because one or more lines are too long

7
dist/post/index.js vendored
View file

@ -11,6 +11,7 @@ const core = __nccwpck_require__(37484)
const github = __nccwpck_require__(93228) const github = __nccwpck_require__(93228)
const bazeliskVersion = core.getInput('bazelisk-version') const bazeliskVersion = core.getInput('bazelisk-version')
const cacheSave = core.getBooleanInput('cache-save')
const cacheVersion = core.getInput('cache-version') const cacheVersion = core.getInput('cache-version')
const moduleRoot = core.getInput('module-root') const moduleRoot = core.getInput('module-root')
@ -143,6 +144,7 @@ core.exportVariable('BAZELISK_GITHUB_TOKEN', token)
module.exports = { module.exports = {
baseCacheKey, baseCacheKey,
cacheSave,
bazeliskCache: { bazeliskCache: {
enabled: core.getBooleanInput('bazelisk-cache'), enabled: core.getBooleanInput('bazelisk-cache'),
files: [`${moduleRoot}/.bazelversion`], files: [`${moduleRoot}/.bazelversion`],
@ -103012,6 +103014,11 @@ async function run() {
} }
async function saveCaches() { async function saveCaches() {
if (!config.cacheSave) {
core.info('Cache saving is disabled (cache-save: false)')
return
}
await saveCache(config.bazeliskCache) await saveCache(config.bazeliskCache)
await saveCache(config.diskCache) await saveCache(config.diskCache)
await saveCache(config.repositoryCache) await saveCache(config.repositoryCache)

File diff suppressed because one or more lines are too long

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "setup-bazel", "name": "setup-bazel",
"version": "0.17.0", "version": "0.18.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "setup-bazel", "name": "setup-bazel",
"version": "0.17.0", "version": "0.18.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/cache": "^5.0.0", "@actions/cache": "^5.0.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "setup-bazel", "name": "setup-bazel",
"version": "0.17.0", "version": "0.18.0",
"description": "Install and configure Bazel for GitHub Actions", "description": "Install and configure Bazel for GitHub Actions",
"main": "index.js", "main": "index.js",
"engines": { "engines": {