Skip to content

Commit

Permalink
Fix the version error in the release workflow (#5274)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serene-Arc authored Jun 9, 2024
2 parents 1b59479 + d2a94c1 commit b53908f
Show file tree
Hide file tree
Showing 3 changed files with 173 additions and 173 deletions.
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

0 comments on commit b53908f

Please sign in to comment.