diff --git a/.github/publish-mastodon-template.md b/.github/publish-mastodon-template.md index 308374f11..02f628ae0 100644 --- a/.github/publish-mastodon-template.md +++ b/.github/publish-mastodon-template.md @@ -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/ diff --git a/.github/workflows/publish-mastodon.yml b/.github/workflows/publish-mastodon.yml index ca2f70987..98a5df731 100644 --- a/.github/workflows/publish-mastodon.yml +++ b/.github/workflows/publish-mastodon.yml @@ -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 @@ -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) @@ -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 }} diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4f7dc1fb4..a20bd834e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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`). diff --git a/pyproject.toml b/pyproject.toml index 0e49d34f2..046c7f9bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 diff --git a/xclim/__init__.py b/xclim/__init__.py index 16ca73b60..2680845d2 100644 --- a/xclim/__init__.py +++ b/xclim/__init__.py @@ -13,7 +13,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.53.2-dev.2" +__version__ = "0.53.2" with _resources.as_file(_resources.files("xclim.data")) as _module_data: