Skip to content
tag

GitHub Action

Release Changes

v2 Latest version

Release Changes

tag

Release Changes

GitHub Actions for checking changes between releases

Installation

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

              

- name: Release Changes

uses: polytech-com/release-changes-action@v2

Learn more about this action in polytech-com/release-changes-action

Choose a version

Release Changes

GitHub release GitHub

GitHub Actions for checking changes between releases.

Changes are found by looking at new commits from the latest tag on the workflow branch. This can be helpful for skipping upload of sheduled builds etc. and an alternative to always upload on push.

Usage

Below is an example of skipping upload of releases to GitHub for sheduled builds and workflow dispatch triggers when no new commits have been added since last release. Pull requests will always indicate no changes.

name: ci

on:
  workflow_dispatch:
  schedule:
    - cron: '0 18 * * 1-5'
  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Build
        run: ./build.sh
      - name: Check release changes
        uses: polytech-com/release-changes-action@v2
        id: release
      - name: Upload to GitHub
        uses: softprops/action-gh-release@v1
        if: ${{ steps.release.outputs.changes == 'true' }}
        with:
          target_commitish: ${{ github.sha }}

Inputs

The following input values are supported and can be changed if needed.

Name  Type  Description Default
sha string The commit SHA that triggered the workflow run ${{ github.sha }}
ref_name string The branch or tag name that triggered the workflow run ${{ github.ref_name }}

Outputs

The following outputs are supported.

Name  Type  Description
changes boolean Indicates if there are changes from the latest release
latest string The lastest release on the workflow branch