Refactor Sabhero wrapper installation to separately publish config and migrations; enhance TailwindCSS installation by removing incompatible dependencies, supporting forced reinstall, and improving package version handling. #42
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Release | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
paths-ignore: | |
- '.github/**' | |
jobs: | |
release: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Get Token | |
id: get_workflow_token | |
uses: peter-murray/workflow-application-token-action@v4 | |
with: | |
application_id: ${{ vars.FUELVIEWS_BOT_APP_ID }} | |
application_private_key: ${{ secrets.FUELVIEWS_BOT_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'main' | |
fetch-depth: '0' | |
token: ${{ steps.get_workflow_token.outputs.token }} | |
- name: Bump version and push tag | |
id: bump_version | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }} | |
DEFAULT_BUMP: patch | |
WITH_V: true | |
RELEASE_BRANCHES: main | |
BRANCH_HISTORY: last | |
CASE_INSENSITIVE: true | |
MAJOR_STRING_TOKEN: '#major' | |
MINOR_STRING_TOKEN: '#minor' | |
PATCH_STRING_TOKEN: '#patch' | |
- name: Get Previous Tag | |
id: get_previous_tag | |
run: | | |
prev_tag=$(git tag --sort=-creatordate | grep '^v' | grep -v '${{ steps.bump_version.outputs.new_tag }}' | head -n 1) | |
echo "Previous tag: $prev_tag" | |
echo "previous_tag=$prev_tag" >> $GITHUB_OUTPUT | |
- name: Generate Release Notes | |
id: generate_release_notes | |
shell: bash | |
env: | |
TOKEN: ${{ steps.get_workflow_token.outputs.token }} | |
NEW_TAG: ${{ steps.bump_version.outputs.new_tag }} | |
PREVIOUS_TAG: ${{ steps.get_previous_tag.outputs.previous_tag }} | |
OWNER: ${{ github.repository_owner }} | |
REPO: ${{ github.event.repository.name }} | |
run: | | |
response=$(curl -s -X POST \ | |
-H "Authorization: Bearer $TOKEN" \ | |
-H "Accept: application/vnd.github+json" \ | |
https://api.github.com/repos/$OWNER/$REPO/releases/generate-notes \ | |
-d @- <<EOF | |
{ | |
"tag_name": "$NEW_TAG", | |
"previous_tag_name": "$PREVIOUS_TAG", | |
"target_commitish": "main" | |
} | |
EOF | |
) | |
if echo "$response" | grep -q '"message":'; then | |
echo "Error generating release notes:" | |
echo "$response" | |
exit 1 | |
fi | |
body=$(echo "$response" | jq -r '.body') | |
echo "body<<EOF" >> $GITHUB_OUTPUT | |
echo "$body" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Update Changelog | |
uses: stefanzweifel/changelog-updater-action@v1 | |
with: | |
latest-version: ${{ steps.bump_version.outputs.new_tag }} | |
release-notes: ${{ steps.generate_release_notes.outputs.body }} | |
path-to-changelog: "CHANGELOG.md" | |
- name: Amend updated CHANGELOG | |
env: | |
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }} | |
run: | | |
git config user.name "fuelviews-app[bot]" | |
git config user.email "fuelviews-app[bot]@users.noreply.github.com" | |
git add CHANGELOG.md | |
git commit --amend --no-edit | |
git push origin main --force | |
- name: Release | |
id: release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }} | |
with: | |
tag_name: ${{ steps.bump_version.outputs.new_tag }} | |
body: ${{ steps.generate_release_notes.outputs.body }} |