mirror of
https://github.com/beetbox/beets.git
synced 2026-01-04 23:12:51 +01:00
71 lines
No EOL
1.9 KiB
YAML
71 lines
No EOL
1.9 KiB
YAML
name: Make a Beets Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Version of the new release'
|
|
required: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.9"
|
|
- run: pip install build wheel sphinx
|
|
- name: Build a binary wheel and a source tarball
|
|
env:
|
|
TZ: UTC
|
|
run: python3 -m build
|
|
- name: Store the distribution packages
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: python-package-distributions
|
|
path: dist/
|
|
|
|
make_github_release:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bump version and push tag
|
|
id: tag_version
|
|
uses: mathieudutour/github-tag-action@v6.1
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
custom_tag: ${{ inputs.version }}
|
|
- name: Download all the dists
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: python-package-distributions
|
|
path: dist/
|
|
- name: Create a GitHub release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: ${{ steps.tag_version.outputs.new_tag }}
|
|
name: Release ${{ steps.tag_version.outputs.new_tag }}
|
|
body: ${{ steps.tag_version.outputs.changelog }}
|
|
artifacts: dist/
|
|
|
|
publish_to_pypi:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
environment:
|
|
name: pypi
|
|
url: https://pypi.org/p/beets
|
|
permissions:
|
|
id-token: write
|
|
steps:
|
|
- name: Download all the dists
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: python-package-distributions
|
|
path: dist/
|
|
- name: Publish distribution 📦 to PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
|
|
|