• This repository has been archived on 05/May/2024
  • Stars
    star
    735
  • Rank 61,652 (Top 2 %)
  • Language
  • License
    MIT License
  • Created about 5 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

READONLY: Auto-generated mirror for https://github.com/marvinpinto/actions/tree/master/packages/automatic-releases

GitHub Automatic Releases

This action simplifies the GitHub release process by automatically uploading assets, generating changelogs, handling pre-releases, and so on.

Contents

  1. Usage Examples
  2. Supported Parameters
  3. Event Triggers
  4. Versioning
  5. How to get help
  6. License

NOTE: The marvinpinto/action-automatic-releases repository is an automatically generated mirror of the marvinpinto/actions monorepo containing this and other actions. Please file issues and pull requests over there.

Usage Examples

Automatically generate a pre-release when changes land on master

This example workflow will kick in as soon as changes land on master. After running the steps to build and test your project:

  1. It will create (or replace) a git tag called latest.
  2. Generate a changelog from all the commits between this, and the previous latest tag.
  3. Generate a new release associated with the latest tag (removing any previous associated releases).
  4. Update this new release with the specified title (e.g. Development Build).
  5. Upload LICENSE.txt and any jar files as release assets.
  6. Mark this release as a pre-release.

You can see a working example of this workflow over at marvinpinto/actions.

---
name: "pre-release"

on:
  push:
    branches:
      - "master"

jobs:
  pre-release:
    name: "Pre Release"
    runs-on: "ubuntu-latest"

    steps:
      # ...
      - name: "Build & test"
        run: |
          echo "done!"

      - uses: "marvinpinto/action-automatic-releases@latest"
        with:
          repo_token: "${{ secrets.GITHUB_TOKEN }}"
          automatic_release_tag: "latest"
          prerelease: true
          title: "Development Build"
          files: |
            LICENSE.txt
            *.jar

Create a new GitHub release when tags are pushed to the repository

Similar to the previous example, this workflow will kick in as soon as new tags are pushed to GitHub. After building & testing your project:

  1. Generate a changelog from all the commits between this and the previous semver-looking tag.
  2. Generate a new release and associate it with this tag.
  3. Upload LICENSE.txt and any jar files as release assets.

Once again there's an example of this over at marvinpinto/actions.

---
name: "tagged-release"

on:
  push:
    tags:
      - "v*"

jobs:
  tagged-release:
    name: "Tagged Release"
    runs-on: "ubuntu-latest"

    steps:
      # ...
      - name: "Build & test"
        run: |
          echo "done!"

      - uses: "marvinpinto/action-automatic-releases@latest"
        with:
          repo_token: "${{ secrets.GITHUB_TOKEN }}"
          prerelease: false
          files: |
            LICENSE.txt
            *.jar

Supported Parameters

Parameter Description Default
repo_token** GitHub Action token, e.g. "${{ secrets.GITHUB_TOKEN }}". null
draft Mark this release as a draft? false
prerelease Mark this release as a pre-release? true
automatic_release_tag Tag name to use for automatic releases, e.g latest. null
title Release title; defaults to the tag name if none specified. Tag Name
files Files to upload as part of the release assets. null

Outputs

The following output values can be accessed via ${{ steps.<step-id>.outputs.<output-name> }}:

Name Description Type
automatic_releases_tag The release tag this action just processed string
upload_url The URL for uploading additional assets to the release string

Notes:

  • Parameters denoted with ** are required.
  • The files parameter supports multi-line glob patterns, see repository examples.

Event Triggers

The GitHub Actions framework allows you to trigger this (and other) actions on many combinations of events. For example, you could create specific pre-releases for release candidate tags (e.g *-rc*), generate releases as changes land on master (example above), nightly releases, and much more. Read through Workflow syntax for GitHub Actions for ideas and advanced examples.

Versioning

Every commit that lands on master for this project triggers an automatic build as well as a tagged release called latest. If you don't wish to live on the bleeding edge you may use a stable release instead. See releases for the available versions.

- uses: "marvinpinto/action-automatic-releases@<VERSION>"

How to get help

The main README for this project has a bunch of information related to debugging & submitting issues. If you're still stuck, try and get a hold of me on keybase and I will do my best to help you out.

License

The source code for this project is released under the MIT License. This project is not associated with GitHub.

More Repositories

1

actions

A Collection of GitHub Actions
TypeScript
131
star
2

ledger-reconciler

Automatically download and reconcile your ledger financial entries
JavaScript
50
star
3

charlesbot

Charlesbot is a Python3 bot written to take advantage of Slack's Real Time Messaging API
Python
25
star
4

irc-hooky

Send custom webhook-triggered notifications to IRC using a serverless architecture
Python
15
star
5

action-inject-ssm-secrets

READONLY: Auto-generated mirror for https://github.com/marvinpinto/actions/tree/master/packages/aws-ssm-secrets
13
star
6

ansible-role-docker-nginx

Ansible role to manage and run the nginx docker container
HTML
11
star
7

slc

slc is a CLI application to generate Ledger accounting entries. It works with generic CSV files as well as the Stripe API.
Go
10
star
8

kitchensink

A Kitchen Sink Development Environment
Shell
10
star
9

ansible-role-docker

Ansible Galaxy role to install and manage Docker
Python
9
star
10

docker-media-converter

A docker container to convert your `mkv` files to an `mp4` format which Plex is capable of direct streaming.
Shell
9
star
11

ansible-role-plex

Ansible Galaxy role to install and manage plex media server.
8
star
12

windows-throwaway-image

Throwaway Windows Vagrant Images
6
star
13

action-keybase-notifications

READONLY: Auto-generated mirror for https://github.com/marvinpinto/actions/tree/master/packages/keybase-notifications
6
star
14

laptop

Configuration used to bootstrap and manage my development laptop
Perl
5
star
15

ansible-role-docker-sabnzbd

Ansible Galaxy role to manage and run the sabnzbd docker container
2
star
16

charlesbot-broadcast-message

A Charlesbot plugin that sends out a nifty broadcast message!
Python
1
star
17

ansible-role-oauth2-proxy

Ansible Galaxy role to install and manage Bitly's OAuth2 Proxy.
Shell
1
star
18

ansible-role-authy-ssh

Ansible Galaxy role to install and configure Authy 2FA for SSH logins
1
star
19

disjoint.ca

Source code for my website.
JavaScript
1
star
20

ansible-role-sabnzbd

Ansible Galaxy role to install and manage SABnzbd.
1
star
21

charlesbot-jira

A Charlesbot plugin that interacts with Jira and does some cool shit
Python
1
star
22

ansible-role-docker-couchpotato

Ansible Galaxy role to manage and run the couchpotato docker container
1
star