Skip to content

docs: update CHANGELOG.md for test/pre-release #71

docs: update CHANGELOG.md for test/pre-release

docs: update CHANGELOG.md for test/pre-release #71

Workflow file for this run

name: "pre-release"
on:
push:
branches:
- "test/pre-release"
# schedule:
# - cron: '0 6 * * 5'
workflow_dispatch:
jobs:
pre-release:
name: "Pre Release"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Fix grub-efi-amd64 error
# run: |
# sudo apt remove shim-signed grub-efi-amd64-bin -y --allow-remove-essential
# - name: Prepare for setup
# run: sudo sh prepare-ubuntu.sh
# - name: Setup environment
# working-directory: ./ansible
# run: ansible-playbook -i inventory.yml setup-ubuntu.yml
- name: Push latest tag
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git tag latest
git push origin latest --force
- name: Get previous tag
id: previousTag
run: |
name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -2 | head -1)
echo "previousTag: $name"
echo "previousTag=$name" >> $GITHUB_ENV
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
fromTag: latest
toTag: ${{ env.previousTag }}
- name: Create Pre-Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
draft: true
makeLatest: true
tag: latest
prerelease: true
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}
- name: Commit CHANGELOG.md
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: ${{ github.ref_name }}
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }}'
file_pattern: CHANGELOG.md