From 18897179fbd5b1e9b726843e0715122838a1335c Mon Sep 17 00:00:00 2001 From: "khanh.nguyen" Date: Wed, 30 Mar 2022 18:49:36 +0200 Subject: [PATCH 1/2] Add changelog file and tagging release --- .github/workflows/gh-release.yml | 35 ++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 11 +++++++++- CHANGELOG.md | 5 +++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/gh-release.yml create mode 100644 CHANGELOG.md diff --git a/.github/workflows/gh-release.yml b/.github/workflows/gh-release.yml new file mode 100644 index 0000000..1564622 --- /dev/null +++ b/.github/workflows/gh-release.yml @@ -0,0 +1,35 @@ +name: Github Release + +on: + push: + branches: [ master ] + +jobs: + create-release: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Setup git + run: | + git config user.email "developers@messagebird.com" + git config user.name "MessageBird CI" + - name: Prepare description + run: | + csplit -s CHANGELOG.md "/##/" {1} + cat xx01 > CHANGELOG.tmp + - name: Prepare tag + run: | + export TAG=$(head -1 CHANGELOG.tmp | cut -d' ' -f2) + echo "TAG=$TAG" >> $GITHUB_ENV + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.TAG }} + release_name: ${{ env.TAG }} + body_path: CHANGELOG.tmp + draft: false + prerelease: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 712b889..ba9f076 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,12 +50,21 @@ jobs: git config user.name "MessageBird CI" git fetch git checkout ${{ github.event.pull_request.head.ref }} + - name: Prepare CHANGELOG + run: | + echo "${{ github.event.pull_request.body }}" | csplit -s - "/##/" + echo "# Changelog + ## ${{ env.VERSION }} + " >> CHANGELOG.tmp + grep "^*" xx01 >> CHANGELOG.tmp + grep -v "^# " CHANGELOG.md >> CHANGELOG.tmp + cp CHANGELOG.tmp CHANGELOG.md - name: Prepare version.rb run: | sed -i "s|STRING = '[^']*'|STRING = '${{ env.VERSION }}'|" lib/messagebird/version.rb - name: Commit changes run: | - git add lib/messagebird/version.rb + git add CHANGELOG.md lib/messagebird/version.rb git commit -m "Bump to version ${{ env.VERSION }}" - name: Push run: git push diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..fc908e3 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +## 3.1.0 + +* [ADDED] Add release and publish GitHub actions From 668e3306903b22cc54e21943431b2cdf1241b2c7 Mon Sep 17 00:00:00 2001 From: MessageBird CI Date: Wed, 30 Mar 2022 17:00:53 +0000 Subject: [PATCH 2/2] Bump to version 3.1.1 --- CHANGELOG.md | 7 ++++++- lib/messagebird/version.rb | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc908e3..185a952 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 3.1.1 + +* [ADDED] Add release tagging workflow. ## 3.1.0 -* [ADDED] Add release and publish GitHub actions +* [CHANGED] Deprecate old signed request validation. +* [ADDED] New request validator with JWT webhook signature. +* [ADDED] Add release and publish GitHub actions. diff --git a/lib/messagebird/version.rb b/lib/messagebird/version.rb index 9c5850a..5d863aa 100644 --- a/lib/messagebird/version.rb +++ b/lib/messagebird/version.rb @@ -2,6 +2,6 @@ module MessageBird module Version - STRING = '3.1.0' + STRING = '3.1.1' end end