Skip to content

Commit

Permalink
Merge eb694f4 into f9edce4
Browse files Browse the repository at this point in the history
  • Loading branch information
amishas157 authored Oct 28, 2024
2 parents f9edce4 + eb694f4 commit 826926e
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/* .
</details>

### What
Expand Down
53 changes: 36 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release Drafter and Publisher

on:
pull_request:
types:
- closed
# types:
# - closed
branches:
- master

Expand All @@ -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
Expand Down Expand Up @@ -43,29 +43,48 @@ 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: Create and publish new tag
- name: Update CHANGELOG.md
run: |
git tag ${{ steps.nextversion.outputs.NEXT_VERSION }}
git push origin ${{ steps.nextversion.outputs.NEXT_VERSION }}
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
- 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 }}
- name: Commit changes
run: |
git config --local user.email "[email protected]"
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: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 }}

# - 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 }}
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<branch-name>`
- `feature/<branch-name>`
- `major/<branch-name>`
- `minor/<branch-name>`
- `patch/<branch-name>`

If branch is already made, just rename it _before passing the pull request_.
Expand Down

0 comments on commit 826926e

Please sign in to comment.