Skip to content

Commit

Permalink
Prepare v0.53.2 (#1974)
Browse files Browse the repository at this point in the history
### What kind of change does this PR introduce?

* Prepares the next release
* Simplifies the logic for the mastodon publishing workflow

### Does this PR introduce a breaking change?

This release places a pin on `xarray` that renders it incompatible with
version 24.10.0 due to a regression.
  • Loading branch information
Zeitsperre authored Oct 30, 2024
2 parents 293fb1c + a4ac753 commit fa928c1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/publish-mastodon-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
New #xclim release: {{ .version }} 🎉
New #xclim release: {{ .tag }} 🎉

Latest source code available at: https://github.com/Ouranosinc/xclim/releases/tag/{{ .version }}
Latest source code available at: {{ .url }}
Check out the docs for more information: https://xclim.readthedocs.io/en/stable/

30 changes: 4 additions & 26 deletions .github/workflows/publish-mastodon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,7 @@ name: Publish Release Announcement to Mastodon
on:
release:
types:
- published
workflow_dispatch:
inputs:
version-tag:
description: 'Version to announce'
required: true
type: string
dry-run:
description: 'Dry run'
default: true
type: boolean
- released

permissions:
contents: read
Expand All @@ -37,23 +27,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Current Version
if: ${{ !github.event.inputs.version-tag }}
run: |
CURRENT_VERSION="$(grep -E '__version__' xclim/__init__.py | cut -d ' ' -f3)"
echo "version=v${CURRENT_VERSION}" >> $GITHUB_ENV
- name: Set Version from Input
if: ${{ github.event.inputs.version-tag }}
run: |
echo "version=${{ github.event.inputs.version-tag }}" >> $GITHUB_ENV
- name: Get Release Description
if: ${{ !endsWith(env.current_version, '-dev') }}
id: get_release_description
run: |
# Fetch the release information using the GitHub API
RELEASE_INFO=$(curl -sH "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ env.version }}")
"https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ github.event.release.tag_name }}")
# Extract the release description from the response
RELEASE_DESCRIPTION=$(echo "$RELEASE_INFO" | jq -r .body)
Expand All @@ -72,14 +50,14 @@ jobs:
with:
template: .github/publish-mastodon-template.md
vars: |
version: ${{ env.version }}
tag: ${{ github.event.release.tag_name }}
url: https://github.com/Ouranosinc/xclim/releases/tag/${{ github.event.release.tag_name }}
- name: Message Preview
run: |
echo "${{ steps.render_template.outputs.result }}${{ env.contributors }}"
- name: Send toot to Mastodon
if: ${{ github.event.inputs.dry-run != 'true' }} || ${{ github.event_name == 'release' }}
uses: cbrgm/mastodon-github-action@b26d62619432b20c2129edd86f07f7ede9797fc9 # v2.1.9
with:
url: ${{ secrets.MASTODON_URL }}
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Changelog
=========

v0.54.0 (unreleased)
v0.53.2 (2024-10-30)
--------------------
Contributors to this version: Éric Dupuis (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`), Trevor James Smith (:user:`Zeitsperre`).

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ target-version = [
]

[tool.bumpversion]
current_version = "0.53.2-dev.2"
current_version = "0.53.2"
commit = true
commit_args = "--no-verify"
tag = false
Expand Down
2 changes: 1 addition & 1 deletion xclim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

__author__ = """Travis Logan"""
__email__ = "[email protected]"
__version__ = "0.53.2-dev.2"
__version__ = "0.53.2"


with _resources.as_file(_resources.files("xclim.data")) as _module_data:
Expand Down

0 comments on commit fa928c1

Please sign in to comment.