Skip to content

Commit

Permalink
Merge pull request #132 from aarroyosal/release/2022-11-16
Browse files Browse the repository at this point in the history
Release version 2022-11-16
  • Loading branch information
aarroyosal authored Nov 21, 2022
2 parents ba1ea2b + a75756f commit 0acc051
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ jobs:
draft-new-release:
name: "Draft a new release"
runs-on: ubuntu-latest
outputs:
pr_url: ${{ steps.pull_request.outputs.pr_url }}
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
- name: Check if release tag exists
run: |
if [[ $(git ls-remote --tags origin refs/tags/"${{ github.event.inputs.version }}") ]]; then
Expand Down Expand Up @@ -64,16 +68,15 @@ jobs:
commit_message: Edit changelog versions
branch: release/${{ github.event.inputs.version }}
create_branch: true
commit_user_name: Angel Arroyo
commit_user_email: [email protected]
- name: Create pull request
uses: repo-sync/pull-request@v2
id: pull_request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
source_branch: release/${{ github.event.inputs.version }}
destination_branch: stable
pr_title: Release version ${{ github.event.inputs.version }}
pr_reviewer: ${{ github.actor }}
pr_body: |
This PR was created in response to a manual trigger of the release workflow here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}.
Please, check that the version files and changelogs are correct.
Expand Down Expand Up @@ -101,3 +104,27 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
run: gh workflow run -R https://github.com/CartoDB/documentation.git update-doc.yml -f version=new-${{ github.event.inputs.version }}

notify-slack:
runs-on: ubuntu-20.04
name: "Notify Slack"
needs:
- draft-new-release
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
steps:
- name: Slack notification (#carto-selfhosted)
env:
SLACK_CHANNEL: CRQT3HKCH #analytics-toolbox
SLACK_KEY: ${{ secrets.SLACK_KEY }}
PR_URL: ${{ needs.draft-new-release.outputs.pr_url }}
run: |
set -eu
MESSAGE="Analytics toolbox Release \`${RELEASE_VERSION}\` is ready, please review and merge the PR:
- *Status:* :white_check_mark:
- *<${PR_URL}|Pull Request Analytics toolbox>*"
curl \
-F "text=${MESSAGE}" \
-F "channel=${SLACK_CHANNEL}" \
-H "Authorization: Bearer ${SLACK_KEY}" \
-X POST https://slack.com/api/chat.postMessage
6 changes: 4 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
(startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix/'))
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
- name: Extract version from branch name (for release branches)
if: startsWith(github.event.pull_request.head.ref, 'release/')
run: |
Expand Down Expand Up @@ -92,7 +94,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
source_branch: stable
source_branch: ${{ github.event.pull_request.head.ref }}
destination_branch: main
pr_title: Merge master into dev branch
pr_body: |
Expand All @@ -101,7 +103,7 @@ jobs:
- name: Merge PR if possible
env:
GH_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
run: |
gh pr merge ${{ steps.pull_request.outputs.pr_number }} --auto --merge
Expand Down
6 changes: 6 additions & 0 deletions clouds/bigquery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.4.0] - 2022-11-16

### Changed

- add nice stuff

## [1.3.9] - 2022-11-15

### Changed
Expand Down
2 changes: 1 addition & 1 deletion clouds/bigquery/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.9
1.4.0

0 comments on commit 0acc051

Please sign in to comment.