GithubHelp home page GithubHelp logo

zip-release's Introduction

Zip Release License

GitHub action that can be used to create release archive using zip or tar.

It works on all platforms: Linux, MacOS and Windows.

Usage

An example workflow config:

name: Create Archive
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Archive Release
      uses: thedoctor0/[email protected]
      with:
        type: 'zip'
        filename: 'release.zip'
        exclusions: '*.git* /*node_modules/* .editorconfig'

The generated archive will be placed as specified by directory, path and filename. If you want to attach it to the latest release use another action like ncipollo/release-action:

- name: Upload Release
  uses: ncipollo/[email protected]
  with:
    artifacts: "release.zip"
    token: ${{ secrets.GITHUB_TOKEN }}

Arguments

filename

Default: release.zip

The filename for the generated archive, relative to directory.

If you use type: tar it's recommended to set the filename to a tar.gz (the tarball is always gzip compressed).

directory

Default: .

The working directory where the zip or tar actually runs.

path

Default: .

The path to the files or directory that should be archived, relative to directory.

Path with whitespace is currently not supported because of the limitation of GitHub actions regarding the parameter formatting (no YAML double quoting). A solution based on similar issues will soon be implemented.

type

Default: zip

Either zip or tar or 7z.

Defines if either a ZIP-file is created, or a tar archive (the latter gzipped).

On Windows platform 7zip is used to zip files as zip command is unavailable there.

exclusions

Default: none

List of excluded files or directories.

Please note: this handles slightly differently, depending on if you use type: zip or type: tar.

ZIP requires you to specify wildcards or full filenames.

TAR allows you to specify only the filename, no matter if it's in a subdirectory.

recursive_exclusions

Default: none

Alternative to exclusions that allows you to specify a list of recursive wildcards. Only applies to type: zip on Windows where 7zip is used.

For example:

exclusions: *.txt will only exclude files ending with .txt

recursive_exclusions: *.txt will exclude files ending with .txt in any subdirectory.

custom

Default: none

Provide any custom parameters to the zipping command.

For example:

custom: --ignore-failed-read option used with tar command, which allows to ignore and continue on unreadable files.

command

Default: none

An extra command that will run before zipping.

For example:

command: "mkdir -p release" can be used to create a directory where the archived file can be stored to fix tar issue with file changed as we read it error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.