GitHub Action
Discard 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.
Discards the cache with binary executables produced on each platform and shelved earlier:
- 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:
jobs:
release:
steps:
...
- uses: prantlf/discard-shelf-action@v3
with:
name: vpm
branches: master v1.x
The following parameters can be specified using the with
object:
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
.
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 "*".
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.
Type: Boolean
Default: true
Include the archive for Linux.
Type: Boolean
Default: true
Include the archive for macOS.
Type: Boolean
Default: true
Include the archive for Windows.
Copyright (C) 2023-2024 Ferdinand Prantl
Licensed under the MIT License.