Sign inSign up

aevea/release-notary

By aevea

•Updated over 2 years ago

Image
1

50K+

aevea/release-notary repository overview

⁠Release notary

Test GitHub release (latest by date) GitHub commits since latest release

Release Notary builds release notes using Conventional Commit⁠ standard and then publishes it to Github. Release notes are appended to any text you already have in your release and therefore will not affect important announcements etc.

Currently supported providers are: [Github, Gitlab].

Heavily inspired by https://github.com/graphql/graphql-js/releases⁠, but usable as a standalone app.

Expected output is HERE⁠

:warning: Currently experimental. Please report any issues :warning:

⁠Table of contents
  1. Setup⁠
  2. Usage⁠

⁠Setup

⁠Github

Variables:

NameExample valueRequired
GITHUB_TOKENtoken (provided in Github Action or HERE⁠)true
GITHUB_REPOSITORYcommitsar-app/commitsartrue

In Github actions GITHUB_REPOSITORY is provided in the correct format. Does not need to be explicitly added.

In Github actions GITHUB_TOKEN is provided with the correct access rights, elsewhere it needs to be generated and added to the pipeline. Please see the usage⁠ section.

⁠Gitlab

Variables:

In Gitlab CI all the values are provided except for GITLAB_TOKEN. Documentation provided here⁠.

NameExample valueRequired
GITLAB_TOKENtokentrue
CI_API_V4_URLhttps://gitlab.com/api/v4⁠true
CI_COMMIT_TAGv0.0.4true
CI_PROJECT_ID1234true
⁠Slack

Slack integration posts release notes into Slack using the Incoming webhook integration. Slack Documentation⁠

⁠Usage

⁠Using Github actions
⁠actions/checkout@v2

actions/checkout@v2 behaves differently from the first version. It pulls in just the latest commit and does not pull any other git objects. Release Notary needs these objects in order to work.

It should be run only on tags.

Example workflow file:

name: Release
on:
  push:
    tags:
      - v*
jobs:
  release-notes:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Release Notary Action
        uses: docker://aevea/release-notary:0.9.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
⁠actions/checkout@v1

Should be run only on tags, example is HERE⁠:

on:
  push:
    tags:
      - "v*"

Checkout git in order to get commits and master branch

- name: Check out code into the Go module directory
  uses: actions/checkout@v1

Run the Release Notary action. Github token needs to be explicitly added so that Release Notary can use it. See https://help.github.com/en/articles/virtual-environments-for-github-actions⁠

- name: Release Notary Action
  uses: aevea/[email protected] (substitute for current version)
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
⁠Gitlab CI
release:
  stage: release
  variables:
    GITLAB_TOKEN: $RELEASE_TOKEN
  image:
    name: aevea/release-notary:latest
    entrypoint: [""]
  script:
    - release-notary publish
  only:
    - tags
⁠Using binary

Download and run: (Substitute v0.0.2 for current version)

- curl -L -O https://github.com/aevea/release-notary/releases/download/v0.0.2/release-notary_v0.0.2_Linux_x86_64.tar.gz
- tar -xzf release-notary_v0.0.2_Linux_x86_64.tar.gz
# Set up any required variables
- export GITHUB_TOKEN=yourtoken
- export GITHUB_REPOSITORY=owner/repo
- ./release-notary publish

Tag summary

Content type

Image

Digest

sha256:690915bf8…

Size

29.3 MB

Last updated

over 2 years ago

docker pull aevea/release-notary