Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the version error in the release workflow #5274

Merged
merged 6 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 27 additions & 20 deletions .github/workflows/make_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,35 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Version of the new release'
description: 'Version of the new release, just as a number with no prepended "v"'
required: true

jobs:
increment_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pandoc
run: sudo apt update && sudo apt install pandoc -y
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Run version script
id: script
run: |
python extra/release.py "${{ inputs.version }}"
- uses: EndBug/add-and-commit@v9
name: Commit the changes
with:
message: 'Increment version numbers to ${{ inputs.version }}'

- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Run version script
id: script
run: |
python extra/release.py bump "${{ inputs.version }}"
- uses: EndBug/add-and-commit@v9
name: Commit the changes
with:
message: "Increment version numbers to ${{ inputs.version }}"

build:
runs-on: ubuntu-latest
needs: increment_version
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -52,6 +53,14 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- name: Install pandoc
run: sudo apt update && sudo apt install pandoc -y
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Obtain the changelog
run: echo CHANGELOG="$(python ./extra/release.py changelog)" >> $GITHUB_ENV
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
Expand All @@ -68,7 +77,7 @@ jobs:
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: "Check [here](https://beets.readthedocs.io/en/stable/changelog.html) for the latest changes."
body: ${{ env.CHANGELOG }}
artifacts: dist/*

publish_to_pypi:
Expand All @@ -87,5 +96,3 @@ jobs:
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1


4 changes: 2 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Changelog
=========

2.0.1 (in development)
----------------------
Unreleased
----------

Changelog goes here! Please add your entry to the bottom of one of the lists below!

Expand Down
Loading
Loading