Skip to content

A Github action to get the release BEFORE the most recent release

License

Notifications You must be signed in to change notification settings

sammcoe/get-previous-release-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

get-previous-release-action

A Github Action for getting the previous (the one BEFORE the most recent) release tag from git and outputting that for use in other actions

Outputs

tag

The release tag of the previous release

Example usage

Basic

- name: Get previous release tag
  id: previous-release
  uses: actions/get-previous-release-action@v1

Updating the most recent release

update_release:
  name: Update Release
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v2
      with:
        ref: main
        fetch-depth:
    - uses: rlespinasse/[email protected]
    - name: Get previous release tag
      id: previous-release
      uses: sammcoe/get-previous-release-action@v1
    - name: Generate Changelog
      id: changelog
      uses: metcalfc/[email protected]
      with:
        mytoken: ${{ secrets.GITHUB_TOKEN }}
        base-ref: ${{ steps.previous-release.output.release }}
    - name: Updating Release
      uses: ncipollo/[email protected]
      with:
        body: |
          Changes in this Release: 
          ${{ steps.changelog.outputs.changelog }}

        token: ${{ secrets.GITHUB_TOKEN }}
        name: Release ${{ env.GITHUB_REF_SLUG }}
        allowUpdates: true

About

A Github action to get the release BEFORE the most recent release

Resources

License

Stars

Watchers

Forks

Packages

No packages published