Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/prantlf/discard-shelf-action

GitHub action for discarding the cache with the build output, where it was shelved by shelve-output-action, after it was used for uploading as artefacts for a new release.
https://github.com/prantlf/discard-shelf-action

actions github github-actions release v vlang

Last synced: about 2 months ago
JSON representation

GitHub action for discarding the cache with the build output, where it was shelved by shelve-output-action, after it was used for uploading as artefacts for a new release.

Awesome Lists containing this project

README

        

# Discard Shelf with Build Output

GitHub action for discarding the cache with the build output, where it was shelved by [shelve-output-action], after it was used for uploading as artefacts for a new release.

Only platforms Linux, macOS, Windows on the architecture X64 are supported.

## Usage

Discards the cache with binary executables produced on each platform and shelved earlier:

```yml
- uses: prantlf/discard-shelf-action@v3
```

Depending on the `name` of the executable, it will discard the cache with the following cache keys. For example, for the name `newchanges`:

| OS | Cache Key |
|:--------|:-----------------------------------|
| Linux | `newchanges-linux-x64.zip-{sha}` |
| macOS | `newchanges-macos-x64.zip-{sha}` |
| Windows | `newchanges-windows-x64.zip-{sha}` |

The name prefix of the archives can be specified by `name`. If not specified, it will be inferred from the project configuration (`v.mod`). The `{sha}` in the cache key is the SHA-1 hash of the current commit.

Use a different name prefix than the default in the package archive name and work only in specific release branches:

```yml
jobs:
release:
steps:
...
- uses: prantlf/discard-shelf-action@v3
with:
name: vpm
branches: master v1.x
```

## Inputs

The following parameters can be specified using the `with` object:

### name

Type: `String`

Default: (read from `v.mod`)

The name of the archive without the platform and architecture and without the `.zip` extension. The project name from `v.mod` will be used by default. The expected names of the archives will be `{name}-{os}-{arch}.zip`, for example: `newchanges-linux-x64.zip`.

### branches

Type: `String`

Default: `'main master'`

Branches which this action should run for, which are used to publishing releases. Use whitespace for separating the branch names. If you want to use multiple lines in YAML, introduce them with ">-". If you want to allow all branches, set the value to "*".

### enable

Type: `Boolean`

Default: `true`

Can be set to `false` to prevent this action from discarding the cache. It's helpful in the pipeline, which will not continue releasing, but only building and testing, and that will be decided in the middle of a job execution.

### include-linux

Type: `Boolean`

Default: `true`

Include the archive for Linux.

### include-macos

Type: `Boolean`

Default: `true`

Include the archive for macOS.

### include-windows

Type: `Boolean`

Default: `true`

Include the archive for Windows.

## License

Copyright (C) 2023-2024 Ferdinand Prantl

Licensed under the [MIT License].

[MIT License]: http://en.wikipedia.org/wiki/MIT_License
[shelve-output-action]: https://github.com/prantlf/shelve-output-action