Coder Social home page Coder Social logo

yqrashawn / actions-upload-release-asset Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shogo82148/actions-upload-release-asset

0.0 0.0 0.0 4.77 MB

Yet Another Upload Release Asset Action

License: MIT License

TypeScript 93.64% JavaScript 1.11% Shell 5.25%

actions-upload-release-asset's Introduction

GitHub Action - Releases API

test

This GitHub Action uploads release assets using Upload a release asset.

FEATURE

  • You can upload multiple assets in one step by using glob patterns
  • The actions guesses the content-type from the extensions

SYNOPSIS

Upload assets when a release has been created

You can upload assets when a release has been created.

on:
  release:
    types:
      - created

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]

      # steps for building assets
      - run: echo "REPLACE ME!" > assets.txt

      - uses: shogo82148/[email protected]
        with:
          upload_url: ${{ github.event.release.upload_url }}
          asset_path: assets.txt

Upload assets when a tag has been created

If you want to create a release in your workflow, you can use shogo82148/actions-create-release GitHub Action.

on:
  push:
    tags:
      - 'v*'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]

      # steps for building assets
      - run: echo "REPLACE ME!" > assets.txt

      - name: Create Release
        id: create_release
        uses: shogo82148/[email protected]

      - uses: shogo82148/[email protected]
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: assets.txt

Inputs

github_token

The API token for GitHub. ${{ github.token }} is used by default.

upload_url

The URL for uploading assets to the release.

asset_path

The path to the asset you want to upload. You can use glob patterns here.

asset_name

The name of the asset you want to upload. The file name of asset_path is used by default.

asset_content_type

The content-type of the asset you want to upload. See the supported Media Types here: https://www.iana.org/assignments/media-types/media-types.xhtml for more information.

By default, the actions guesses the content-type using the mime-types package.

overwrite

If an asset with the same name already exists, overwrite it (Default: false).

Related works

actions-upload-release-asset's People

Contributors

cssho avatar dependabot-preview[bot] avatar dependabot[bot] avatar shogo82148 avatar

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.