Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
trash

GitHub Action

Discard Build Output

v2.1.1

Discard Build Output

trash

Discard Build Output

GitHub action for discarding the cache with the build output, where it was shelved by shelve-output-action after a release

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Discard Build Output

uses: prantlf/[email protected]

Learn more about this action in prantlf/discard-shelf-action

Choose a version

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:

- uses: prantlf/discard-shelf-action@v2

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:

jobs:
  release:
    steps:
    ...
    - uses: prantlf/discard-shelf-action@v2
      with:
        name: vpm

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.

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 Ferdinand Prantl

Licensed under the MIT License.