Skip to content
play

GitHub Action

Simple tags and releases

v0.3.2 Latest version

Simple tags and releases

play

Simple tags and releases

Simple tag and release process for your repos

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Simple tags and releases

uses: sbe-arg/[email protected]

Learn more about this action in sbe-arg/simple-tags-and-releases

Choose a version

simple-tags-and-releases

OpenSSF Best Practices

USAGE

with:
  autogenerated_notes: 'true|false' # defaults to 'true' to leverage github autogenerated notes in the release
  version_file: path # defaults to 'VERSION' will tag and release based on the contents of the file such as 'v1.2.3'
name: tag-and-release

on:
  push:
    branches:
      - main

jobs:

  flow:
    runs-on: ubuntu-22.04
    permissions:
      contents: write
    steps:

      - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
        with:
          fetch-depth: '0'

      - name: tar
        id: tar
        run: |
          tar cf \
            some-tar.tar \
            ./VERSION \
            ./*some-files
          echo "tar=some-tar.tar" >> "${GITHUB_OUTPUT}"

      - name: simple-tag-and-release
        uses: sbe-arg/simple-tags-and-releases@84e09724a8eddf0fb8e01bedc91ab95f142d203d # v0.2.0
        with:
          autogenerated_notes: 'true'
          version_file: 'folder/sub-folder/file-name'
          upload_file: ${{ steps.tar.outputs.tar/orSomeFile }}
        env:
          GH_TOKEN: ${{ github.token }}

what for: simple release processes

  • versioning from a file source
  • upload a single file to the release

what does it look like

safeguards

  • exit 0 if the tag already exists
  • exit 1 if the version in file is not semver valid. Uses semver-tool

extras

  • if you want a version bump reminder in your prs, you can use this example