Skip to content

Implement dynamic versioning in CI workflow#3

Merged
pplupo merged 1 commit into
masterfrom
update-r-version-4.5.0
Jun 9, 2025
Merged

Implement dynamic versioning in CI workflow#3
pplupo merged 1 commit into
masterfrom
update-r-version-4.5.0

Conversation

@pplupo
Copy link
Copy Markdown
Owner

@pplupo pplupo commented Jun 9, 2025

This commit introduces a dynamic versioning strategy for package builds in the GitHub Actions CI workflow.

Changes include:

  • Added a .ver file to store the base version number (e.g., "1.0.1").
  • Modified .github/workflows/R-CMD-check.yml:
    • Reads the base version from the .ver file.
    • Retrieves the short Git commit SHA.
    • Constructs a dynamic version string in the format "BASE_VERSION.COMMIT_SHA" (e.g., "1.0.1.abcdef0").
    • Temporarily updates the Version: field in the DESCRIPTION file with this dynamic version before building the package.
    • Names the uploaded package tarball artifact using this dynamic version string (e.g., processcontrol-1.0.1.abcdef0.tar.gz).

This approach ensures that each build artifact is uniquely identifiable by its base version and the specific commit it was built from.

This commit introduces a dynamic versioning strategy for package builds in the GitHub Actions CI workflow.

Changes include:
- Added a `.ver` file to store the base version number (e.g., "1.0.1").
- Modified `.github/workflows/R-CMD-check.yml`:
    - Reads the base version from the `.ver` file.
    - Retrieves the short Git commit SHA.
    - Constructs a dynamic version string in the format "BASE_VERSION.COMMIT_SHA" (e.g., "1.0.1.abcdef0").
    - Temporarily updates the `Version:` field in the `DESCRIPTION` file with this dynamic version before building the package.
    - Names the uploaded package tarball artifact using this dynamic version string (e.g., `processcontrol-1.0.1.abcdef0.tar.gz`).

This approach ensures that each build artifact is uniquely identifiable by its base version and the specific commit it was built from.
@pplupo pplupo merged commit 8d057e7 into master Jun 9, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant