From a5f2c7417bb9a79e110ba4638962b818023fb26f Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Mon, 28 Oct 2024 11:28:02 -0500 Subject: [PATCH 1/5] Add changelog file and update github workflow to update it when PR merges to master --- .github/pull_request_template.md | 2 +- .github/workflows/release.yml | 25 ++++++++++++++++--- CHANGELOG.md | 41 ++++++++++++++++++++++++++++++++ README.md | 4 ++-- 4 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f59339a..cfdef37 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -20,7 +20,7 @@ change is, and why it is being made, with enough context for anyone to understan ### Release planning - [ ] I've decided if this PR requires a new major/minor/patch version accordingly to - [semver](https://semver.org/), and I've changed the name of the BRANCH to release/* , feature/* or patch/* . + [semver](https://semver.org/), and I've changed the name of the BRANCH to major/* , minor/* or patch/* . ### What diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ae0c99..d31ebec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,19 +43,38 @@ jobs: CURRENT_VERSION="${{ steps.gettag.outputs.TAG }}" CURRENT_VERSION="${CURRENT_VERSION#v}" # Remove the 'v' from the start of the version IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION" - if [[ $BRANCH_NAME =~ ^release/ ]]; then + if [[ $BRANCH_NAME =~ ^major/ ]]; then VERSION_PARTS[0]=$((VERSION_PARTS[0] + 1)) VERSION_PARTS[1]=0 VERSION_PARTS[2]=0 - elif [[ $BRANCH_NAME =~ ^feature/ ]]; then + elif [[ $BRANCH_NAME =~ ^minor/ ]]; then VERSION_PARTS[1]=$((VERSION_PARTS[1] + 1)) VERSION_PARTS[2]=0 - elif [[ $BRANCH_NAME =~ ^patch/ ]]; then + else VERSION_PARTS[2]=$((VERSION_PARTS[2] + 1)) fi NEXT_VERSION="v${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.${VERSION_PARTS[2]}" echo ::set-output name=NEXT_VERSION::"$NEXT_VERSION" + - name: Update CHANGELOG.md + run: | + EXISTING_CHANGELOG=$(cat CHANGELOG.md) + echo " " > CHANGELOG.md + echo "## ${{ steps.nextversion.outputs.NEXT_VERSION }}" >> CHANGELOG.md + echo "- ${{ github.event.pull_request.title }} (#${{ github.event.pull_request.number }}) @${{ github.event.pull_request.user.login }}" >> CHANGELOG.md + echo " " >> CHANGELOG.md + echo -e "$EXISTING_CHANGELOG" >> CHANGELOG.md + + - name: Commit changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add CHANGELOG.md + git commit -m "Update CHANGELOG.md for PR #${{ github.event.pull_request.number }}" + + - name: Push changes + run: git push origin HEAD:master + - name: Create and publish new tag run: | git tag ${{ steps.nextversion.outputs.NEXT_VERSION }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..dd73ada --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,41 @@ +## v1.12.25 + +- Disable staging tests in jenkins (#106) @amishas157 + +## v1.0.0 + +- [HUBBLE-297] Release continuous integration (#47) @laysabit +- release CI template (#46) @laysabit +- Hubble 406 - Feature / PR template (#45) @laysabit +- Update READMEs (#41) @chowbao +- Update dbt test to support P21 (#42) @chowbao +- Environmental changes (#40) @laysabit +- Pre commit branch (#38) @laysabit +- Add asset_id missing columns to both trustlines and offers stagings (#32) @caioribeiro99 +- fix dbt profiles dir (#36) @laysabit +- Dbt docs website CI (#31) @laysabit +- Update `dbtutils` tests (#30) @sydneynotthecity +- Add soroban eho table (#28) @sydneynotthecity +- Update liquidity pool staging to bring the asset id (#29) @caioribeiro99 +- Diff quality (#27) @laysabit +- Update packages.yml (#25) @vitorweiss +- Adjust eho timing (#24) @sydneynotthecity +- Change config_setting_id and flags description docs (#23) @cayod +- Change refundable_fee to resource_fee (#22) @chowbao +- Fix asset_id typo (#21) @chowbao +- Fix test errors in source tables (#20) @chowbao +- Update soroban pipelines (#17) @chowbao +- Remove elementary volume anomalies check (#19) @chowbao +- Remove store failures in ledger seq test (#18) @chowbao +- Add tags to models (#16) @chowbao +- Pass asset info in trade agg (#15) @chowbao +- Update enriched_history_operations.yml (#13) @sydneynotthecity +- dbt Elementary and tests configuration (#11) @enercolini +- Removing all relationship tests for public data (#12) @enercolini +- Incremental logic fix (#10) @PerriLucas +- Update enriched_history_operations.sql (#9) @sydneynotthecity +- implement tagging in ci #major (#7) @cayod +- Added git tagging changes to readme #patch (#8) @PerriLucas +- Some fixes and addition of fee_stats and trade_agg (#6) @PerriLucas +- Feature/readme update (#5) @debora-hcalves +- first public dbt commit (#2) @PerriLucas diff --git a/README.md b/README.md index f2d2748..d060ddc 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ If you're interested in setting up your own dbt project, you can find detailed i Pay attention, it is very important to know if your modification to this repository is a release (breaking changes), a feature (functionalities) or a patch(to fix bugs). With that information, create your branch name like this: -- `release/` -- `feature/` +- `major/` +- `minor/` - `patch/` If branch is already made, just rename it _before passing the pull request_. From eb694f4f48c17515a5a8b00e9517ba11cfe2c211 Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Mon, 28 Oct 2024 11:32:33 -0500 Subject: [PATCH 2/5] Test changelog updater --- .github/workflows/release.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d31ebec..c681ea1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,8 @@ name: Release Drafter and Publisher on: pull_request: - types: - - closed + # types: + # - closed branches: - master @@ -12,7 +12,7 @@ permissions: jobs: new_release: - if: github.event.pull_request.merged == true + # if: github.event.pull_request.merged == true permissions: # write permission is required to create a github release contents: write @@ -73,18 +73,18 @@ jobs: git commit -m "Update CHANGELOG.md for PR #${{ github.event.pull_request.number }}" - name: Push changes - run: git push origin HEAD:master + run: git push origin HEAD:patch/add-changelog - - name: Create and publish new tag - run: | - git tag ${{ steps.nextversion.outputs.NEXT_VERSION }} - git push origin ${{ steps.nextversion.outputs.NEXT_VERSION }} + # - name: Create and publish new tag + # run: | + # git tag ${{ steps.nextversion.outputs.NEXT_VERSION }} + # git push origin ${{ steps.nextversion.outputs.NEXT_VERSION }} - - uses: release-drafter/release-drafter@v5 - with: - commitish: master - name: "stellar-dbt-public ${{ steps.nextversion.outputs.NEXT_VERSION }}" - tag: ${{ steps.nextversion.outputs.NEXT_VERSION }} - publish: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - uses: release-drafter/release-drafter@v5 + # with: + # commitish: master + # name: "stellar-dbt-public ${{ steps.nextversion.outputs.NEXT_VERSION }}" + # tag: ${{ steps.nextversion.outputs.NEXT_VERSION }} + # publish: true + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d3d10b04f5be8ef28388d8e1816f555b59c36456 Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Mon, 28 Oct 2024 11:33:43 -0500 Subject: [PATCH 3/5] Revert "Test changelog updater" This reverts commit eb694f4f48c17515a5a8b00e9517ba11cfe2c211. --- .github/workflows/release.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c681ea1..d31ebec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,8 @@ name: Release Drafter and Publisher on: pull_request: - # types: - # - closed + types: + - closed branches: - master @@ -12,7 +12,7 @@ permissions: jobs: new_release: - # if: github.event.pull_request.merged == true + if: github.event.pull_request.merged == true permissions: # write permission is required to create a github release contents: write @@ -73,18 +73,18 @@ jobs: git commit -m "Update CHANGELOG.md for PR #${{ github.event.pull_request.number }}" - name: Push changes - run: git push origin HEAD:patch/add-changelog + run: git push origin HEAD:master - # - name: Create and publish new tag - # run: | - # git tag ${{ steps.nextversion.outputs.NEXT_VERSION }} - # git push origin ${{ steps.nextversion.outputs.NEXT_VERSION }} + - name: Create and publish new tag + run: | + git tag ${{ steps.nextversion.outputs.NEXT_VERSION }} + git push origin ${{ steps.nextversion.outputs.NEXT_VERSION }} - # - uses: release-drafter/release-drafter@v5 - # with: - # commitish: master - # name: "stellar-dbt-public ${{ steps.nextversion.outputs.NEXT_VERSION }}" - # tag: ${{ steps.nextversion.outputs.NEXT_VERSION }} - # publish: true - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: release-drafter/release-drafter@v5 + with: + commitish: master + name: "stellar-dbt-public ${{ steps.nextversion.outputs.NEXT_VERSION }}" + tag: ${{ steps.nextversion.outputs.NEXT_VERSION }} + publish: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b7db3934b5272191492c969a9460d50666c52e4e Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Mon, 28 Oct 2024 16:52:10 -0500 Subject: [PATCH 4/5] Add a reference to release --- .github/workflows/release.yml | 19 ---------------- CHANGELOG.md | 42 +---------------------------------- 2 files changed, 1 insertion(+), 60 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d31ebec..82b8d15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,25 +56,6 @@ jobs: NEXT_VERSION="v${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.${VERSION_PARTS[2]}" echo ::set-output name=NEXT_VERSION::"$NEXT_VERSION" - - name: Update CHANGELOG.md - run: | - EXISTING_CHANGELOG=$(cat CHANGELOG.md) - echo " " > CHANGELOG.md - echo "## ${{ steps.nextversion.outputs.NEXT_VERSION }}" >> CHANGELOG.md - echo "- ${{ github.event.pull_request.title }} (#${{ github.event.pull_request.number }}) @${{ github.event.pull_request.user.login }}" >> CHANGELOG.md - echo " " >> CHANGELOG.md - echo -e "$EXISTING_CHANGELOG" >> CHANGELOG.md - - - name: Commit changes - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add CHANGELOG.md - git commit -m "Update CHANGELOG.md for PR #${{ github.event.pull_request.number }}" - - - name: Push changes - run: git push origin HEAD:master - - name: Create and publish new tag run: | git tag ${{ steps.nextversion.outputs.NEXT_VERSION }} diff --git a/CHANGELOG.md b/CHANGELOG.md index dd73ada..0369384 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,41 +1 @@ -## v1.12.25 - -- Disable staging tests in jenkins (#106) @amishas157 - -## v1.0.0 - -- [HUBBLE-297] Release continuous integration (#47) @laysabit -- release CI template (#46) @laysabit -- Hubble 406 - Feature / PR template (#45) @laysabit -- Update READMEs (#41) @chowbao -- Update dbt test to support P21 (#42) @chowbao -- Environmental changes (#40) @laysabit -- Pre commit branch (#38) @laysabit -- Add asset_id missing columns to both trustlines and offers stagings (#32) @caioribeiro99 -- fix dbt profiles dir (#36) @laysabit -- Dbt docs website CI (#31) @laysabit -- Update `dbtutils` tests (#30) @sydneynotthecity -- Add soroban eho table (#28) @sydneynotthecity -- Update liquidity pool staging to bring the asset id (#29) @caioribeiro99 -- Diff quality (#27) @laysabit -- Update packages.yml (#25) @vitorweiss -- Adjust eho timing (#24) @sydneynotthecity -- Change config_setting_id and flags description docs (#23) @cayod -- Change refundable_fee to resource_fee (#22) @chowbao -- Fix asset_id typo (#21) @chowbao -- Fix test errors in source tables (#20) @chowbao -- Update soroban pipelines (#17) @chowbao -- Remove elementary volume anomalies check (#19) @chowbao -- Remove store failures in ledger seq test (#18) @chowbao -- Add tags to models (#16) @chowbao -- Pass asset info in trade agg (#15) @chowbao -- Update enriched_history_operations.yml (#13) @sydneynotthecity -- dbt Elementary and tests configuration (#11) @enercolini -- Removing all relationship tests for public data (#12) @enercolini -- Incremental logic fix (#10) @PerriLucas -- Update enriched_history_operations.sql (#9) @sydneynotthecity -- implement tagging in ci #major (#7) @cayod -- Added git tagging changes to readme #patch (#8) @PerriLucas -- Some fixes and addition of fee_stats and trade_agg (#6) @PerriLucas -- Feature/readme update (#5) @debora-hcalves -- first public dbt commit (#2) @PerriLucas +Please refer to https://github.com/stellar/stellar-dbt-public/releases \ No newline at end of file From 2110639a132627480b8b2b50ad8826f369c79a2f Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Mon, 28 Oct 2024 16:52:25 -0500 Subject: [PATCH 5/5] Add a reference to release --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0369384..3a89683 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -Please refer to https://github.com/stellar/stellar-dbt-public/releases \ No newline at end of file +Please refer to https://github.com/stellar/stellar-dbt-public/releases