Skip to content

Release new version #13

Release new version

Release new version #13

Workflow file for this run

name: Release new version
on:
workflow_dispatch:
jobs:
generate-new-release:
environment:
name: release-approval
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
- name: Install installer package
run: pip install xmipp3_installer
- name: Retrieve tag name, release name & changelog
run: |
echo "TAG_NAME=$(./xmipp version --short)" >> $GITHUB_OUTPUT
awk '/## Release/{if (p) exit; p=1} p' CHANGELOG.md > latest_changelog_with_title.md
cat latest_changelog_with_title.md | tail -n +2 > latest_changelog.md
echo "RELEASE_NAME=$(cat latest_changelog_with_title.md | head -n 1 | sed 's/## Release //' | sed 's/^ *//')" >> $GITHUB_OUTPUT
id: variables
- name: Generate tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.variables.outputs.TAG_NAME }}
tag_prefix: ''
previous_tag: 'v3.25.06.0-Rhea'
- name: Update major version tag
run: |
VERSION=${{ steps.variables.outputs.TAG_NAME }}
MAJOR=${VERSION%%.*}
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git tag -fa "v${MAJOR}" -m 'Update major version tag with $VERSION'
git push origin "v${MAJOR}" --force
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.variables.outputs.RELEASE_NAME }}
bodyFile: latest_changelog.md