Skip to content

create-release

create-release #37

Workflow file for this run

name: create-release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v4.6.1
jobs:
release:
runs-on: ubuntu-latest
steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # was: actions/checkout@v4
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@7613b906189aa1c8599753c6583f1925a78b9554 # was: metcalfc/changelog-generator@v4.6.1
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # was: ncipollo/release-action@v1
with:
tag: ${{ github.ref }}
name: Release ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changelog }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update Major Version Tag
run: |
MAJOR_VERSION=$(echo "${{ github.ref_name }}" | grep -oE 'v[0-9]+')
git tag -f $MAJOR_VERSION
git push origin $MAJOR_VERSION --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}