Skip to content

add smoke test for --notify-users #7

add smoke test for --notify-users

add smoke test for --notify-users #7

Workflow file for this run

name: release
on:
push:
tags:
- "v*.*.*"
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate release notes
id: release-notes
run: |
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -z "$PREVIOUS_TAG" ]; then
# If no previous tag, get all commits since the beginning
CHANGELOG=$(git log --pretty=format:"- %s (%h)" --no-merges)
else
# Get commits since the previous tag
CHANGELOG=$(git log ${PREVIOUS_TAG}..HEAD --pretty=format:"- %s (%h)" --no-merges)
fi
NOTES="## Changes in ${{ github.ref_name }}
$CHANGELOG
### Installation
Use this version in your workflows:
\`\`\`yaml
uses: replicatedhq/replicated-actions/ACTION_NAME@${{ github.ref_name }}
\`\`\`"
echo "notes<<EOF" >> $GITHUB_OUTPUT
echo "$NOTES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body: ${{ steps.release-notes.outputs.notes }}
draft: false
prerelease: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }}