Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

127 run autoconf or autoreconf and commit configure file when creating new release branch #130

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/initiate_version_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
echo "VERSION=`echo $(echo '${{ github.ref_name }}'|grep -Eo '[0-9]+.[0-9]+.[0-9]+')`" >> $GITHUB_OUTPUT
echo "PREVIOUS_VERSION=`echo $(git tag --list --sort=version:refname | grep -E '^[0-9]+.[0-9]+.[0-9]+$' | tail -n1)`" >> $GITHUB_OUTPUT
echo "AUTHOR=`echo $(git log -1 --pretty=%an)`" >> $GITHUB_OUTPUT

- name: Get git-chglog and update CHANGELOG
run: |
wget ${{ env.CHGLOG_PATH }}/${{ env.CHGLOG_RELEASE}}.tar.gz # get the binary for the chglog
Expand All @@ -63,10 +64,12 @@ jobs:
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Install desc to update DESCRIPTION file
run: |
install.packages(c("desc"))
shell: Rscript {0}

- name: Update DESCRIPTION file
run: |
df = desc::description$new(file='DESCRIPTION')
Expand All @@ -80,6 +83,16 @@ jobs:
sed -i -e '/^AC_INIT/s/[0-9]\+.[0-9]\.[0-9]\+/${{ steps.release_version.outputs.version }}/g' configure.ac
shell: bash

- name: Generate the configure file
run: |
sudo apt-get -y install autoconf
autoreconf

- name: Update status badges in the readme file
run: |
# updated the branch parameter for all badges
sed -i -e "s/?branch=release-${{ steps.release_version.outputs.previous_version}}/?branch=release-${{ steps.release_version.outputs.version}}/g" README.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this as wildcard: [0-9]\+.[0-9]\.[0-9]\+


- name: Create version release Pull Request
id: release_pr
# NOTE: We might want to perform this step with gh cli natively
Expand All @@ -89,9 +102,11 @@ jobs:
commit-message: "Version ${{ steps.release_version.outputs.version }}"
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: |
README.md
NEWS.md
DESCRIPTION
configure.ac
configure
delete-branch: true # NOTE: No immediate delete after merge, instead branches with no diff are deleted
title: Release version ${{ steps.release_version.outputs.version }}
body: |
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# abn: Additive Bayesian Networks <a href="https://r-bayesian-networks.org/"><img src="man/figures/logo.png" align="right" height="139" /></a>

<!-- badges: start -->
<!-- WARNING: -->
<!-- The ?branch=release-x.y.y is updated automatically by the initiate_version_release workflow -->
[![status](https://joss.theoj.org/papers/1bbc43a2be86f5d3f831cedb5cf81812/status.svg)](https://joss.theoj.org/papers/1bbc43a2be86f5d3f831cedb5cf81812)
[![On Label CRAN Checks](https://github.com/furrer-lab/abn/actions/workflows/onlabel_CRAN_checks.yml/badge.svg)](https://github.com/furrer-lab/abn/actions/workflows/onlabel_CRAN_checks.yml)
[![On Label CRAN Checks](https://github.com/furrer-lab/abn/actions/workflows/onlabel_CRAN_checks.yml/badge.svg?branch=release-3.1.1)](https://github.com/furrer-lab/abn/actions/workflows/onlabel_CRAN_checks.yml)
[![Codecov](https://img.shields.io/codecov/c/github/furrer-lab/abn)](https://app.codecov.io/gh/furrer-lab/abn)
[![GitHub R package version](https://img.shields.io/github/r-package/v/furrer-lab/abn)](https://github.com/furrer-lab/abn/tags)
![cran](https://www.r-pkg.org/badges/version-ago/abn)
Expand Down
Loading