Coder Social home page Coder Social logo

github-action-publish-binaries's Introduction

GitHub Action for Uploading Release Artifacts

This repository contains a simple GitHub Action implementation which allows you to attach binaries to a new (github) release of your repository.

Enabling the action

There are two steps required to use this action:

  • Enable the action inside your repository.
    • This will mean creating a file .github/workflows/release.yml which is where the action is invoked.
    • You'll specify a pattern to describe which binary-artifacts are uploaded.
  • Ensure your binary artifacts are generated.
    • Ideally you should do this in your workflow using another action.

Sample Configuration

The following configuration file uses this action, along with the github-action-build action to generate the artifacts for a project, then attach them to a release.

on:
  release:
    types: [created]
name: Handle Release
jobs:
  generate:
    name: Create release-artifacts
    runs-on: ubuntu-latest
    steps:
      - name: Checkout the repository
        uses: actions/checkout@master
      - name: Generate the artifacts
        uses: skx/github-action-build@master
      - name: Upload the artifacts
        uses: skx/github-action-publish-binaries@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          args: 'example-*'

This is the preferred approach because it uses a pair of distinct actions, each having one job:

GITHUB_TOKEN

Your workflow configuration file, named .github/workflows/release.yml, will contain a reference to secrets.GITHUB_TOKEN, however you do not need to generate that, or update your project settings in any way!

You can inject secrets into workflows, defining them in the project settings, and referring to them by name, but the GITHUB_TOKEN value is special and it is handled transparently, requiring no manual setup.

github-action-publish-binaries's People

Contributors

gergelyszaz avatar juliankahnert avatar skx avatar varshavaradarajan avatar

Watchers

 avatar  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.