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

ci: add reusable workflow to create nightly tags in CalVer format #3247

Merged
merged 8 commits into from
Jan 8, 2024

Conversation

SanchithHegde
Copy link
Member

@SanchithHegde SanchithHegde commented Jan 4, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This PR adds a new reusable workflow to create tags in the calendar versioning (CalVer) format YYYY.0M.0D.MICRO (month and date are zero-padded, and the MICRO version number starts from zero) instead of the existing release-new-version workflow to create SemVer tags. The workflow uses a GitHub app token and GitHub API calls to commit the changes and tag them in order to have verified commits and tags.

The reusable workflow can be used like so (provided the secrets have been set up):

jobs:
  create-nightly-tag:
    name: Create a nightly tag
    uses: juspay/hyperswitch/.github/workflows/release-nightly-version-reusable.yml@main # Or ...@<commit_sha>
    secrets:
      app_id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}
      app_private_key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}

Refer to the docs for more information.

Prerequisites for using the reusable workflow

  1. The first CalVer tag must be tagged manually (by some user), the workflow does not handle that case.
  2. The workflow needs a git-cliff configuration file located at .github/git-cliff-changelog.toml.

Motivation and Context

We will be using CalVer tags for daily tags, which will be used internally for testing, and SemVer tags for stable releases which are meant to be used by end users.

How did you test it?

I temporarily updated the workflow file to run on this branch, the commits in this PR include the commits pushed by the bot. Note that the commits created by the bot are also signed.

One of the action runs: https://github.com/juspay/hyperswitch/actions/runs/7401505144

As a proof of the tag that was created by the bot, I'm including a screenshot of the tag that was pushed (which was since deleted). Note that the tag created is also signed.

Screenshot of CalVer tag created

The 2024.01.03-test-tag had to be created manually by me because the workflow does not handle that case.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@SanchithHegde SanchithHegde added A-CI-CD Area: Continuous Integration/Deployment C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Jan 4, 2024
@SanchithHegde SanchithHegde self-assigned this Jan 4, 2024
@SanchithHegde SanchithHegde requested a review from a team as a code owner January 4, 2024 13:33
ShankarSinghC
ShankarSinghC previously approved these changes Jan 5, 2024
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jan 8, 2024
Merged via the queue into main with commit 962592a Jan 8, 2024
@Gnanasundari24 Gnanasundari24 deleted the ci-nightly-tag-workflow branch January 8, 2024 07:52
@SanchithHegde SanchithHegde removed A-CI-CD Area: Continuous Integration/Deployment S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Jan 8, 2024
@SanchithHegde SanchithHegde added the A-CI-CD Area: Continuous Integration/Deployment label Jan 8, 2024
pixincreate added a commit that referenced this pull request Jan 9, 2024
* 'main' of github.com:juspay/hyperswitch:
  feat(pm_list): add required fields for Ideal  (#3183)
  refactor: pass customer object to `make_pm_data` (#3246)
  feat(Connector): [VOLT] Add support for Payments Webhooks (#3155)
  fix(users): Added merchant name is list merchants (#3289)
  fix(outgoingwebhookevents): Throw an error when outgoing webhook events env var not found (#3291)
  fix(wasm): fix failing `wasm-pack build` for `euclid_wasm` (#3284)
  ci: add workflow to create stable SemVer tag for a given CalVer tag (#3285)
  fix(connector): [BOA, Cybersource] capture error_code (#3239)
  fix(connector): [BOA/CYB] Fix Metadata Error (#3283)
  chore(version): 2024.01.08.0
  fix: introduce net_amount field in payment response (#3115)
  ci(postman): Adyen assertion fix for expired card test case  (#3279)
  feat(connector): Add Revoke mandate flow (#3261)
  refactor(drainer): change logic for trimming the stream and refactor for modularity (#3128)
  fix(router): Payment link api contract change (#2975)
  feat(pm_list): add required fields for eps (#3169)
  refactor(api_lock): allow api lock on psync only when force sync is true (#3242)
  fix(router): multiple incremental_authorizations with kv enabled (#3185)
  feat(payments): add payment id in all the payment logs (#3142)
  ci: add reusable workflow to create nightly tags in CalVer format (#3247)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI-CD Area: Continuous Integration/Deployment C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants